TrunkingInstanceResource.php 481 Bytes
Newer Older
Juliper committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php

abstract class Services_Twilio_TrunkingInstanceResource extends Services_Twilio_NextGenInstanceResource {

    protected function setupSubresources() {
        foreach (func_get_args() as $name) {
            $constantized = ucfirst(self::camelize($name));
            $type = "Services_Twilio_Rest_Trunking_" . $constantized;
            $this->subresources[$name] = new $type(
                $this->client, $this->uri . "/$constantized"
            );
        }
    }

}