public function performAction() { $identity = Password::findIdentity($this->login, $this->password); AuthService::getInstance()->signIn($identity); Router::redirect($this->io->makeAnchor(AlbumCommand::createState())); $this->response->success('btch'); }
public function performAction() { if ($user = AuthService::getInstance()->getUser()) { Router::redirect($this->io->makeAnchor(AlbumCommand::createState())); } $this->response->addContent(new Heading('Welcome aboard!')); $this->response->addContent(LoginForm::create()); }
static function setUpDefinition(Definition $definition, $options) { $definition->title = 'Traveler\'s blog'; $options->action = Command\Option::create(Command\EnumActions::create()->addToEnum(Index::definition(), '')->addToEnum(AlbumCommand::definition(), 'album')->addToEnum(Auth::definition()))->setIsUnnamed()->setDescription('Application action'); }