public static function get()
    {
       $args = func_get_args();
       
       $that = self::get_this($args);
       $term = self::get_term($args);
       $id = self::get_id($args);
       $plural = self::get_is_plural($args);

       if ($plural) {
         $url = URIResource::Make($that->path, array($that->id, GenericResource::getPath($term)));
         $dp = new DataPacketCollection($that->client->get($url));
         $cl = GenericResource::getObjClass($term);
         $pobjcl = "Catapult\\" . $cl . "Collection";
         $pobj = new $pobjcl($dp);
               
         return $pobj;
       } else {
         $url = URIResource::Make($that->path, array($that->id, GenericResource::getPath($term)));
         $dp = new DataPacket($that->client->get($url));
         $cl = GenericResource::getObjClass($term);
         $pobjcl = "Catapult\\" . $cl;
         $pobj = new $pobjcl;

         return Constructor::Make($pobj, $dp->get());
       }


       return Constructor::Make($pobj, $dp->get());
    }
public static function get()
    {
       $args = func_get_args();
       
       $that = self::get_this($args);
       $term = self::get_term($args);
       $id = self::get_id($args);
       $plural = self::get_is_plural($args);

       if ($plural) {
         $url = URIResource::Make($that->path, array($that->id, GenericResource::getPath($term)));
         $dp = new DataPacketCollection($that->client->get($url));
         $cl = GenericResource::getObjClass($term);
         $pobjcl = "Catapult\\" . $cl . "Collection";
         $pobj = new $pobjcl($dp);
               
         return $pobj;
       } else {
         $url = URIResource::Make($that->path, array($that->id, GenericResource::getPath($term)));
         $dp = new DataPacket($that->client->get($url));
         $cl = GenericResource::getObjClass($term);
         $pobjcl = "Catapult\\" . $cl;
         $pobj = new $pobjcl;

         return Constructor::Make($pobj, $dp->get());
       }


       return Constructor::Make($pobj, $dp->get());
    }
public static function get ( ) { $ args = func_get_args ( ) ; $ that = self :: get_this ( $ args ) ; $ term = self :: get_term ( $ args ) ; $ id = self :: get_id ( $ args ) ; $ plural = self :: get_is_plural ( $ args ) ; if ( $ plural ) { $ url = URIResource :: Make ( $ that -> path , array ( $ that -> id , GenericResource :: getPath ( $ term ) ) ) ; $ dp = new DataPacketCollection ( $ that -> client -> get ( $ url ) ) ; $ cl = GenericResource :: getObjClass ( $ term ) ; $ pobjcl = "Catapult\\" . $ cl . "Collection" ; $ pobj = new $ pobjcl ( $ dp ) ; return $ pobj ; } else { $ url = URIResource :: Make ( $ that -> path , array ( $ that -> id , GenericResource :: getPath ( $ term ) ) ) ; $ dp = new DataPacket ( $ that -> client -> get ( $ url ) ) ; $ cl = GenericResource :: getObjClass ( $ term ) ; $ pobjcl = "Catapult\\" . $ cl ; $ pobj = new $ pobjcl ; return Constructor :: Make ( $ pobj , $ dp -> get ( ) ) ; } return Constructor :: Make ( $ pobj , $ dp -> get ( ) ) ; }
Mock get functions
read whether we need to
use an id or not
then run accordingly
last parameter will always
be 'this' object
Mock get functions read whether we need to use an id or not then run accordingly last parameter will always be this object