Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     // Assign all the class objects that were instantiated by the
     // bootstrap file (CodeIgniter.php) to local class variables
     // so that CI can run as one big super object.
     foreach (is_loaded() as $var => $class) {
         $this->{$var} =& load_class($class);
     }
     // In PHP 5 the Loader class is run as a discreet
     // class.  In PHP 4 it extends the Controller @PHP4
     if (is_php('5.0.0') == TRUE) {
         $this->load =& load_class('Loader', 'core');
         $this->load->_base_classes =& is_loaded();
         $this->load->_ci_autoloader();
     } else {
         $this->_ci_autoloader();
         // sync up the objects since PHP4 was working from a copy
         foreach (array_keys(get_object_vars($this)) as $attribute) {
             if (is_object($this->{$attribute})) {
                 $this->load->{$attribute} =& $this->{$attribute};
             }
         }
     }
     log_message('debug', "Controller Class Initialized");
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     $this->_ci_initialize();
     log_message('debug', "Controller Class Initialized");
     $this->meta = array('user_id' => (int) $this->session->userdata('user_id') ?: 0, 'username' => $this->session->userdata('username') ?: 'guest', 'session_id' => $this->session->userdata('session_id'), 'hide_enemy_posts' => $this->session->userdata('hide_enemy_posts'), 'comments_shown' => (int) $this->session->userdata('comments_shown') ?: 50, 'threads_shown' => (int) $this->session->userdata('comments_shown') ?: 50, 'view_html' => (bool) $this->session->userdata('view_html') ?: TRUE);
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     $this->_ci_initialize();
     $this->load->library('session');
     log_message('debug', "Controller Class Initialized");
 }
 /**
  * Constructor
  *
  * Loads the base classes needed to run CI, and runs the "autoload"
  * routinewhich loads the systems specifiedin the "autoload" config file.
  */
 function Controller()
 {
     parent::CI_Base();
     // Assign all the class objects that were instantiated by the
     // front controller to local class variables so that CI can be
     // run as one big super object.
     $this->_ci_assign_core();
     // Load everything specified in the autoload.php file
     $this->load->_ci_autoloader($this->_ci_autoload());
     // This allows anything loaded using $this->load (viwes, files, etc.)
     // to become accessible from within the Controller class functions.
     foreach ($this->ci_is_loaded as $val) {
         $this->load->{$val} =& $this->{$val};
     }
     log_message('debug', "Controller Class Initialized");
 }