public function execute()
 {
     $session = \Libs\Session::current();
     $session->headers()->{'content-type'} = 'application/xml';
     $session->actors()->{'create'} = 'Actors\\Create';
     parent::execute();
 }
 public function execute()
 {
     $session = \Libs\Session::current();
     // Include debug info:
     $session->actors()->{'info'} = 'Actors\\Info';
     parent::execute();
 }
 public function showLogin()
 {
     try {
         if (AuthenticationUtils::isAuthenticated()) {
             header('Location: ' . URL_BASE . "/index.php/Index/index");
             exit;
         } else {
             $a = explode("\\", get_class($this))[1];
             $this->view->render($a, "showLogin", null, $this->getErrores());
         }
     } catch (\Exception $e) {
         View::renderErrors(array($e->getMessage()));
     }
 }
 public function crear($params = array())
 {
     //Llamando al metodo del modelo
     if (isset($params['dia']) && isset($params['demanda']) && isset($params['produccion'])) {
         try {
             $this->crearInventario($params);
             //Renderizando la vista asociada
             $this->view->render(explode("\\", get_class($this))[1], "crear", null, $this->getErrores());
         } catch (\Exception $e) {
             View::renderErrors(array($e->getMessage()));
         }
     } else {
         $this->view->render(explode("\\", get_class($this))[1], "crear", null, $this->getErrores());
     }
 }
示例#5
0
 public function init()
 {
     View::render('home');
 }
示例#6
0
 public function eliminar_jugador($params = array())
 {
     try {
         $this->model->eliminarJugador($params['identificadorr']);
         echo "<script language='javascript'>";
         echo "alert('Jugador eliminado correctamente.')";
         echo "</script>";
         $this->listar();
     } catch (Exception $e) {
         View::renderErrors(array($e->getMessage()));
     }
 }
 public function execute()
 {
     $session = \Libs\Session::current();
     $session->actors()->{'create'} = 'Actors\\Redirect';
     parent::execute();
 }