Example #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();
 }
Example #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();
 }
Example #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();
 }
Example #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();
 }
Example #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();
 }
Example #6
0
 public function test_identity()
 {
     $expected = \Config::get('app.identity');
     $output = \Hybrid\Factory::get_identity();
     $this->assertEquals($expected, $output);
 }
Example #7
0
 public function action_index()
 {
     $title = __('title.login.index');
     $this->template->title = $title;
     $this->template->content = \Hybrid\Factory::view('login/index')->render();
 }