protected function doList() { // TODO sign the state with HMAC $state = json_encode(['userId' => $this->authenticationHelper->getLoggedInUserId()]); $this->setToView(['stores' => $this->getStoreBo()->getList($this->authenticationHelper->getLoggedInUserId()), 'connectUrl' => DiHelper::getInstance()->getFactory()->getOAuth()->getAuthorisationRedirectUrl($state)]); return new StoreListTemplate('stores', 'connectUrl'); }
protected function setUp() { parent::setUp(); $this->diContainer = new SystemContainer(); Application::getInstance()->setDiContainer($this->diContainer); if ($this->initDiHelper) { DiHelper::init(); } require realpath(__DIR__ . '/../../config.php'); }
/** * Returns the current domain prefix * * @return string */ protected function getDomainPrefix() { return DiHelper::getInstance()->getDomainPrefix(); }
public function testGetFactory() { DiHelper::init(); $helper = new DiHelper(); $this->assertInstanceOf(Factory::class, $helper->getFactory(), 'Invalid return value for DiHelper::getFactory()'); }
/** * Returns an instance of OAuth. * * @return OAuth */ protected function getOAuth() { return DiHelper::getInstance()->getFactory()->getOAuth(); }