コード例 #1
0
ファイル: Controller.php プロジェクト: admire93/play
 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::CI_Base();
     $this->_ci_initialize();
     $this->load->library('session');
     log_message('debug', "Controller Class Initialized");
 }
コード例 #2
0
ファイル: Controller.php プロジェクト: neosin/seaforium
 /**
  * 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);
 }
コード例 #3
0
ファイル: Settings.php プロジェクト: 68kb/68kb
 /**
  * Constructor assign CI instance
  *
  * @return 	void
  */
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     $this->_ci->benchmark->mark('get_settings_start');
     $this->get_settings();
     $this->_ci->benchmark->mark('get_settings_end');
 }
コード例 #4
0
ファイル: Controller.php プロジェクト: unisexx/adf16
 /**
  * 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");
 }
コード例 #5
0
ファイル: MY_Loader.php プロジェクト: 8496tar/pyrocms
 public function __construct()
 {
     parent::__construct();
     self::$APP = CI_Base::get_instance();
     self::$APP->config = new MX_Config();
     self::$APP->lang = new MX_Lang();
     $this->_module = self::$APP->router->fetch_module();
 }
コード例 #6
0
ファイル: Cache.php プロジェクト: 68kb/68kb
 /**
  * Constructor - Initializes and references CI
  */
 public function __construct()
 {
     log_message('debug', "Cache Class Initialized.");
     $this->_ci = CI_Base::get_instance();
     $this->_ci->load->library('settings/settings');
     $this->_reset();
     $this->_path = $this->_ci->config->item('cache_path');
     $this->_default_expires = $this->_ci->settings->get_setting('site_cache_time');
     if (!is_dir($this->_path)) {
         show_error("Cache Path not found: {$this->_path}");
     }
 }
コード例 #7
0
ファイル: Migrate.php プロジェクト: 68kb/68kb
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     if (!$this->_ci->config->item('migrations_enabled') or !$this->_ci->config->item('migrations_path')) {
         show_404();
     }
     // $this->_ci->lang->load("setup");
     $this->migrations_path = $this->_ci->config->item('migrations_path');
     if ($this->migrations_path != '' && substr($this->migrations_path, -1) != '/') {
         $this->migrations_path .= '/';
     }
     $this->_ci->load->dbforge();
 }
コード例 #8
0
ファイル: Ci.php プロジェクト: hqye/stblog
 public function __construct()
 {
     self::$APP = CI_Base::get_instance();
     /* assign the core loader */
     self::$APP->load = new MX_Loader();
     /* re-assign language and config for modules */
     if (!is_a(self::$APP->lang, 'MX_Lang')) {
         self::$APP->lang = new MX_Lang();
     }
     if (!is_a(self::$APP->config, 'MX_Config')) {
         self::$APP->config = new MX_Config();
     }
 }
コード例 #9
0
ファイル: Events.php プロジェクト: 68kb/68kb
 /**
  * Construct
  *
  * Allow users to extend the system.
  * Idea from the now defunct Iono
  */
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     $this->_ci->benchmark->mark('add_ons_start');
     // Directory helper
     $this->_ci->load->helper('directory');
     // load any active modules first
     $this->_load_modules();
     // now auto load core helpers
     // by having this after the modules load it
     // allows people to extend helpers
     $this->_core_helpers();
     $this->_ci->benchmark->mark('add_ons_end');
 }
コード例 #10
0
ファイル: Controller.php プロジェクト: kalroot/celula-cms
 public function __construct()
 {
     parent::__construct();
     /* assign the core loader */
     $this->load = load_class('Loader');
     /* the core classes */
     $classes = array('config' => 'Config', 'input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'lang' => 'Language', 'router' => 'Router');
     /* assign the core classes */
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* autoload application items */
     $this->load->_ci_autoloader();
 }
コード例 #11
0
ファイル: Users_auth.php プロジェクト: 68kb/68kb
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     log_message('debug', "User_lib Class Initialized");
     $this->_ci->benchmark->mark('users_lib_start');
     $this->_ci->load->library('session');
     $this->_ci->load->model('users/users_model');
     $this->_ci->load->helper('cookie');
     if ($this->logged_in()) {
         $this->user_data = $this->_ci->users_model->get_user($this->_ci->session->userdata('user_id'));
     } else {
         $this->user_data = $this->_set_guest();
     }
     $this->_ci->benchmark->mark('users_lib_end');
 }
コード例 #12
0
 /**
  * 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");
 }
コード例 #13
0
ファイル: Base.php プロジェクト: unisexx/adf16
 public function __construct()
 {
     parent::__construct();
     /* assign the application instance */
     self::$APP = CI_Base::get_instance();
     /* assign the core classes */
     $classes = CI_VERSION < 2 ? array('config' => 'Config', 'input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'lang' => 'Language', 'router' => 'Router') : is_loaded();
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* assign the core loader */
     $this->load = load_class('Loader', 'core');
     /* autoload application items */
     $this->load->_ci_autoloader();
     /* re-assign language and config for modules */
     if (!is_a($this->lang, 'MX_Lang')) {
         $this->lang = new MX_Lang();
     }
     // if ( ! is_a($this->config, 'MX_Config')) $this->config = new MX_Config;
 }
コード例 #14
0
 public function __construct()
 {
     parent::__construct();
     /* assign the application instance */
     self::$APP = CI_Base::get_instance();
     /* assign the core loader */
     $this->load = new CI_Loader();
     /* use modular config and language */
     $this->config = new MX_Config();
     $this->lang = new MX_Language();
     /* the core classes */
     $classes = array('input' => 'Input', 'benchmark' => 'Benchmark', 'uri' => 'URI', 'output' => 'Output', 'router' => 'Router');
     /* assign the core classes */
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* autoload application items */
     $this->load->_ci_autoloader();
     /* re-assign the core loader to use modules */
     $this->load = class_exists('MX_Loader', FALSE) ? new MX_Loader() : new Loader();
 }
コード例 #15
0
ファイル: Base.php プロジェクト: hqye/stblog
 public function __construct()
 {
     parent::__construct();
     /* assign the application instance */
     self::$APP = CI_Base::get_instance();
     /* assign the core classes */
     $classes = is_loaded();
     foreach ($classes as $key => $class) {
         $this->{$key} = load_class($class);
     }
     /* assign the core loader */
     $this->load = load_class('Loader', 'core');
     /* re-assign language and config for modules */
     if (!is_a($this->lang, 'MX_Lang')) {
         $this->lang = new MX_Lang();
     }
     if (!is_a($this->config, 'MX_Config')) {
         $this->config = new MX_Config();
     }
     /* autoload application items */
     $this->load->_ci_autoloader();
 }
コード例 #16
0
ファイル: Widgets.php プロジェクト: vmichnowicz/pyrocms
 function __get($var)
 {
     return CI_Base::get_instance()->{$var};
 }
コード例 #17
0
ファイル: ST_Loader.php プロジェクト: hqye/stblog
/**
 * Global CI super object for PHP5 ONLY
 *
 * Example:
 * CI()->db->get('table');
 *
 * @staticvar	object	$ci
 * @return		object
 */
function CI()
{
    return CI_Base::get_instance();
}
コード例 #18
0
ファイル: debug_extension.php プロジェクト: 68kb/68kb
 /**
  * Setup events
  *
  * @access	public
  */
 public function __construct($modules)
 {
     $this->_ci = CI_Base::get_instance();
     $modules->register('template/build', $this, 'debug_footer');
     $this->_ci->config->set_item('debug', TRUE);
 }
コード例 #19
0
ファイル: Controller.php プロジェクト: shivercube/kcPHP
 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 public function __construct()
 {
     parent::__construct();
     $this->_ci_initialize();
     log_message('debug', 'Controller Class Initialized');
 }
コード例 #20
0
ファイル: Base5.php プロジェクト: Gninety/Microweber
 public function CI_Base()
 {
     self::$instance = $this;
 }
コード例 #21
0
 public function getCI()
 {
     if (empty($this->ci)) {
         $this->setCI(CI_Base::get_instance());
     }
     return $this->ci;
 }
コード例 #22
0
ファイル: Modules.php プロジェクト: 68kb/68kb
 /**
  * Construct
  */
 public function __construct()
 {
     $this->_ci = CI_Base::get_instance();
     $this->_ci->load->helper('directory');
     $this->allowed = directory_map(APPPATH . 'modules/', TRUE);
 }
コード例 #23
0
 /**
  * Constructor
  *
  * Calls the initialize() function
  */
 function Controller()
 {
     parent::__construct();
     $this->_ci_initialize();
     log_message('debug', "Controller Class Initialized");
 }
コード例 #24
0
 public function __construct()
 {
     $this->JI = CI_Base::get_instance();
     $this->JI->load->library('parser');
     log_message('debug', 'Templater Class Initialized');
 }