public function registerServices(DiInterface $di = null) { $dispatcher = $di->get('dispatcher'); $dispatcher->setDefaultNamespace('OAuth\\Controller'); /** * @var $application \Phalcony\Application */ $application = $di->get('application'); $oauthService = new Service($application->getParameters('oauth'), null); $oauthService->setHttpClient(new Curl()); $di->set('oauth', $oauthService); /** * @var $view \Phalcon\Mvc\View */ $view = $di->get('view'); $view->setLayout('index'); $view->setViewsDir(APPLICATION_PATH . '/modules/oauth/views/'); $view->setLayoutsDir('../../common/layouts/'); $view->setPartialsDir('../../common/partials/'); $di->set('view', $view); }
/** * @return mixed */ protected function getRedirectUri() { return $this->service->getConfig()['redirectUri']; }