Exemplo n.º 1
0
 /**
  * @protected
  * Will set variables to all the views of a controller
  */
 public function render()
 {
     $session = Registry::get("session");
     if ($this->actionView) {
         $this->actionView->set("educator", $session->get("educator"))->set("scholar", $session->get("scholar"))->set("organization", $session->get("organization"));
     }
     if ($this->layoutView) {
         $this->layoutView->set("educator", $session->get("educator"))->set("scholar", $session->get("scholar"))->set("organization", $session->get("organization"));
     }
     parent::render();
 }
Exemplo n.º 2
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $headers = getallheaders();
     if (isset($headers["X-Access-Token"])) {
         $type = strtolower($headers["X-App"]);
         $meta = Meta::first(array("property = ?" => "user", "meta_key = ?" => $type . "-app", "meta_value = ?" => $headers["X-Access-Token"]), array("property_id"));
         if ($meta) {
             $this->_appLogin($meta, $type);
         }
     }
 }
Exemplo n.º 3
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $headers = getallheaders();
     if (isset($headers["X-Access-Token"])) {
         $type = $headers["X-App"];
         $meta = Meta::first(array("property = ?" => $type . "-app", "value = ?" => $headers["X-Access-Token"]), array("user_id"));
         if ($meta) {
             $user = User::first(array("id = ?" => $meta->user_id));
             $this->setUser($user);
         }
     }
 }
Exemplo n.º 4
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->noview();
 }
Exemplo n.º 5
0
 public function __construct($options = [])
 {
     parent::__construct($options);
     $this->JSONView();
 }