示例#1
0
 /**
  * Add a new resource (URI + method) for this engine to perform an action on
  * @param APIResource $resource
  */
 public function addResource(APIResource $resource)
 {
     if (empty($this->paths[$resource->getPath()])) {
         $this->paths[$resource->getPath()] = array();
     }
     $this->paths[$resource->getPath()][$resource->getMethod()] = $resource;
 }
示例#2
0
 public static function API()
 {
     if (APIResource::$_apiRequester == null) {
         APIResource::$_apiRequester = new Iugu_APIRequest();
     }
     return APIResource::$_apiRequester;
 }
示例#3
0
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->loadLanguage();
     APIResource::addIncludePath(JPATH_PLUGINS . DS . 'api' . DS . 'api' . DS . 'resources');
 }