Exemple #1
0
 /**
  * Execute the active controller
  */
 public function processController()
 {
     // closure
     if (is_callable($this->controller)) {
         $func = new \ReflectionFunction($this->controller);
         return $func->invokeArgs($this->controller_args);
     } else {
         return Controller::execute($this->controller, $this->controller_args);
     }
 }
Exemple #2
0
 /**
  * Main page
  */
 public function action_index()
 {
     // logge inn?
     // tar seg også av eventuell nødvendig reauth ved ukjent IP
     if (!$this->user) {
         force_https();
         return \Kofradia\Controller::execute("Users\\Login@index");
     }
     // videresende?
     if (isset($_GET['orign'])) {
         \redirect::handle($_GET['orign'], \redirect::SERVER, \login::$info['ses_secure']);
     }
     new \page_forsiden(\login::$user->player);
 }
Exemple #3
0
 /**
  * Add title to page and deny guests
  */
 public function before()
 {
     parent::before();
     \ess::$b->page->add_title("Kontakter");
     \access::no_guest();
 }
Exemple #4
0
 public function renderFragment($uri, $options = array())
 {
     return Controller::execute($uri, $options)->getContents();
 }