/** * 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; }
public static function API() { if (APIResource::$_apiRequester == null) { APIResource::$_apiRequester = new Iugu_APIRequest(); } return APIResource::$_apiRequester; }
public function __construct(&$subject, $config) { parent::__construct($subject, $config); $this->loadLanguage(); APIResource::addIncludePath(JPATH_PLUGINS . DS . 'api' . DS . 'api' . DS . 'resources'); }