Ejemplo n.º 1
0
 public function indexAction()
 {
     $adapter = new MyAdapter("admin", "qwerty");
     $result = $adapter->authenticate();
     $code = $result->getCode();
     $identity = $result->getIdentity();
     return new ViewModel(['code' => $code, 'identity' => $identity]);
 }
Ejemplo n.º 2
0
 public function indexAction()
 {
     $adapter = new MyAdapter("admin2", "qwerty");
     $result = $adapter->authenticate();
     $code = $result->getCode();
     $identity = $result->getIdentity();
     if ($result->isValid()) {
         return new ViewModel(array('pages' => $this->getPageTable()->fetchAll()));
     } else {
         return new ViewModel(['messadge' => 'Типа форма']);
     }
 }