public function __construct(App $app, RESTAccess $restAccessExtension) { parent::__construct($app); array_push($this->middlewareDirectories, __DIR__ . '/middleware'); $this->addExtension($restAccessExtension); $this->setModelLoaders(array(new DirectoryModelLoader(__DIR__ . '/models', $this, 'MABI\\Identity'))); $this->setControllerLoaders(array(new DirectoryControllerLoader(__DIR__ . '/controllers', $this, 'MABI\\Identity'))); $this->getExtensionModelClasses(); $this->getApp()->getErrorResponseDictionary()->overrideErrorResponses(new Errors()); }
public function __construct(\MABI\App $app, \MABI\Identity\Identity $identityExtension, $facebookOnly = FALSE) { parent::__construct($app); $this->facebookOnly = $facebookOnly; array_push($this->middlewareDirectories, __DIR__ . '/middleware'); $this->addExtension($identityExtension); $this->setModelLoaders(array(new DirectoryModelLoader(__DIR__ . '/models', $this, 'MABI\\FacebookIdentity'))); $this->setControllerLoaders(array(new DirectoryControllerLoader(__DIR__ . '/controllers', $this, 'MABI\\FacebookIdentity'))); $this->getExtensionModelClasses(); foreach ($this->getControllers() as $controller) { $controller->setFacebookOnly($facebookOnly); } $this->getApp()->getErrorResponseDictionary()->overrideErrorResponses(new Errors()); }
public function __construct($app) { parent::__construct($app); array_push($this->middlewareDirectories, __DIR__); }
public function __construct() { if (file_exists(__DIR__ . '/middleware')) { array_push($this->middlewareDirectories, __DIR__ . '/middleware'); } $this->slim = new Slim(); $this->errorResponseDictionary = new DefaultAppErrors(); parent::__construct($this); }