Exemplo n.º 1
0
 /**
  * This method will be called after we route to the destinated method
  * 
  * @access	public
  */
 public function before()
 {
     $this->language = \Hybrid\Factory::get_language();
     $this->user = \Hybrid\Acl_User::get();
     \Event::trigger('controller_before');
     return parent::before();
 }
Exemplo n.º 2
0
 /**
  * This method will be called after we route to the destinated method
  * 
  * @access  public
  * @return  void
  */
 public function before()
 {
     $this->language = Factory::get_language();
     $this->user = Auth::make('user')->get();
     Event::trigger('controller_before');
     return parent::before();
 }
Exemplo n.º 3
0
 /**
  * This method will be called after we route to the destinated method
  * 
  * @access  public
  * @return 	void
  */
 public function before()
 {
     $this->language = Factory::get_language();
     $this->user = Auth::make('user')->get();
     Event::trigger('controller_before');
     if (Request::is_hmvc()) {
         $this->set_content_type = false;
     }
     Restserver::auth();
     return parent::before();
 }
Exemplo n.º 4
0
 /**
  * This method will be called after we route to the destinated method
  * 
  * @access	public
  */
 public function before()
 {
     $this->language = \Hybrid\Factory::get_language();
     $this->user = \Hybrid\Acl_User::get();
     \Event::trigger('controller_before');
     if (\Hybrid\Request::main() !== \Hybrid\Request::active()) {
         $this->set_content_type = false;
     }
     \Hybrid\Restful::auth();
     return parent::before();
 }
Exemplo n.º 5
0
 /**
  * This method will be called before we route to the destinated method
  * 
  * @access  public
  * @return  void
  */
 public function before()
 {
     $this->rest = Restserver::is_rest();
     $this->language = Factory::get_language();
     $this->user = Auth::make('user')->get();
     Event::trigger('controller_before');
     if (false === $this->rest) {
         $this->prepare_template();
     } else {
         $this->prepare_rest();
     }
     return parent::before();
 }
Exemplo n.º 6
0
 public function test_language()
 {
     $expected = \Config::get('language');
     $output = \Hybrid\Factory::get_language();
     $this->assertEquals($expected, $output);
 }