Exemplo n.º 1
0
 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');
 }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 3
0
 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');
 }