コード例 #1
0
ファイル: MY_Loader.php プロジェクト: kams90/nuCMS
 function __construct()
 {
     if (!defined('SPARKPATH')) {
         define('SPARKPATH', 'sparks/');
     }
     parent::__construct();
 }
コード例 #2
0
ファイル: CORE_NAILS_Loader.php プロジェクト: nailsapp/common
 /**
  *	Overloading this method so that if a view is supplied with the prefix of '/' then we
  *	load that view directly rather than try and do anythign clever with the path
  *
  **/
 public function view($view, $vars = array(), $return = FALSE)
 {
     if (strpos($view, '/') === 0) {
         //	The supplied view is an absolute path, so use it.
         //	Add on EXT if it's not there (so pathinfo() works as expected)
         if (substr($view, -4) != EXT) {
             $view .= EXT;
         }
         //	Get path information about the view
         $_pathinfo = pathinfo($view);
         $_path = $_pathinfo['dirname'] . '/';
         $_view = $_pathinfo['filename'];
         //	Set the view path so the loader knows where to look
         $this->_ci_view_paths = array($_path => TRUE) + $this->_ci_view_paths;
         //	Load the view
         return $this->_ci_load(array('_ci_view' => $_view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
     } else {
         //	Try looking in the application folder second - prevents Nails views being loaded
         //	over an application view.
         $_view = FCPATH . APPPATH . 'views/' . $view;
         if (substr($_view, -4) != EXT) {
             $_view .= EXT;
         }
         if (file_exists($_view)) {
             //	Try again with this view
             return $this->view($_view, $vars, $return);
         } else {
             //	Fall back to the old method
             return parent::view($view, $vars, $return);
         }
     }
 }
コード例 #3
0
ファイル: MY_Loader.php プロジェクト: Rotron/hero
 function plugin($plugin)
 {
     if (!is_array($plugin)) {
         self::define_module($plugin);
     }
     return parent::plugin($plugin);
 }
コード例 #4
0
ファイル: MY_Loader.php プロジェクト: centaurustech/gapura
 /**
  * To accomodate CI 2.1.0, we override the initialize() method instead of
  *  the ci_autoloader() method. Once sparks is integrated into CI, we
  *  can avoid the awkward version-specific logic.
  * @return Loader
  */
 function initialize()
 {
     parent::initialize();
     if (!$this->_is_lt_210) {
         $this->ci_autoloader();
     }
     return $this;
 }
コード例 #5
0
 /**
  * CORE LOAD CONSTRUCTOR
  * 
  * Assigns all CI paths to allos common functionality
  * 
  */
 public function __construct()
 {
     parent::__construct();
     $this->_ci_library_paths = array(APPPATH, COMMONPATH, BASEPATH);
     $this->_ci_helper_paths = array(APPPATH, COMMONPATH, BASEPATH);
     $this->_ci_model_paths = array(APPPATH, COMMONPATH);
     $this->_ci_view_paths = array(APPPATH . 'views/' => TRUE, COMMONPATH . 'views/' => TRUE);
     $this->config->_config_paths = array(APPPATH, COMMONPATH);
 }
コード例 #6
0
ファイル: IGO_Loader.php プロジェクト: ci-blox/Ignition-Go
 /**
  * [[Description]]
  */
 public function __construct()
 {
     $this->_ci_ob_level = ob_get_level();
     $this->_ci_library_paths = array(APPPATH, IGOPATH, BASEPATH);
     $this->_ci_helper_paths = array(APPPATH, IGOPATH, BASEPATH);
     $this->_ci_model_paths = array(APPPATH, IGOPATH);
     $this->_ci_view_paths = array(APPPATH . 'views/' => true, IGOPATH . 'views/' => true);
     log_message('debug', 'IGO_Loader Class Initialized');
     parent::__construct();
 }
コード例 #7
0
ファイル: BF_Loader.php プロジェクト: brkrishna/freelance
 /**
  * Load a helper contained within a module.
  *
  * Copied from MX_Loader, modified to check the /bonfire/helpers directory for
  * a 'BF_' prefixed helper.
  *
  * @param string $helper The helper to load.
  *
  * @return void;
  **/
 public function helper($helper = array())
 {
     if (is_array($helper)) {
         return $this->helpers($helper);
     }
     if (isset($this->_ci_helpers[$helper])) {
         return;
     }
     list($path, $_helper) = Modules::find($helper . '_helper', $this->_module, 'helpers/');
     if ($path === false) {
         if (file_exists(BFPATH . "helpers/BF_{$helper}_helper.php")) {
             include_once BFPATH . "helpers/BF_{$helper}_helper.php";
         }
         return parent::helper($helper);
     }
     Modules::load_file($_helper, $path);
     $this->_ci_helpers[$_helper] = TRUE;
 }
コード例 #8
0
ファイル: BF_Loader.php プロジェクト: ivantcholakov/Bonfire
 /**
  * Load a helper contained within a module.
  *
  * Copied from MX_Loader, modified to check the /bonfire/helpers directory for
  * a 'BF_' prefixed helper.
  *
  * @param string $helper The helper to load.
  *
  * @return $this
  **/
 public function helper($helper = array())
 {
     if (is_array($helper)) {
         return $this->helpers($helper);
     }
     if (isset($this->_ci_helpers[$helper])) {
         return;
     }
     list($path, $_helper) = Modules::find("{$helper}_helper", $this->_module, 'helpers/');
     if ($path === false) {
         // If the helper was not found in a module, check the traditional locations.
         parent::helper($helper);
         return $this;
     }
     Modules::load_file($_helper, $path);
     $this->_ci_helpers[$_helper] = true;
     return $this;
 }
コード例 #9
0
ファイル: AG_Loader.php プロジェクト: vitalik199415/ozar
 /** Load a module model **/
 public function model($model, $object_name = NULL, $connect = FALSE)
 {
     if (is_array($model)) {
         return $this->models($model);
     }
     $_alias = $object_name or $_alias = basename($model);
     if (in_array($_alias, $this->_ci_models, TRUE)) {
         return CI::$APP->{$_alias};
     }
     /* check module */
     list($path, $_model) = Modules::find(strtolower($model), $this->_module, 'models/');
     //AG_ ***************************
     if ($path == FALSE) {
         $model_e = explode('/', $model, 2);
         if (count($model_e) > 1) {
             list($path, $_model) = Modules::find(strtolower($model_e[1]), $model_e[0], 'models/');
         }
     }
     //AG_ ----------------------------
     if ($path == FALSE) {
         /* check application & packages */
         parent::model($model, $object_name);
     } else {
         class_exists('CI_Model', FALSE) or load_class('Model', 'core');
         if ($connect !== FALSE and !class_exists('CI_DB', FALSE)) {
             if ($connect === TRUE) {
                 $connect = '';
             }
             $this->database($connect, FALSE, TRUE);
         }
         Modules::load_file($_model, $path);
         $model = ucfirst($_model);
         if (class_exists(users_class_prefix . $model)) {
             $model = users_class_prefix . $model;
         }
         CI::$APP->{$_alias} = new $model();
         $this->_ci_models[] = $_alias;
     }
     return CI::$APP->{$_alias};
 }
コード例 #10
0
ファイル: BF_Loader.php プロジェクト: rakesh-mohanta/Bonfire
 /**
  * Load a helper contained within a module.
  *
  * Copied from MX_Loader, modified to check the /bonfire/helpers directory for
  * a 'BF_' prefixed helper.
  *
  * @param string $helper The helper to load.
  *
  * @return $this
  **/
 public function helper($helper = array())
 {
     if (is_array($helper)) {
         return $this->helpers($helper);
     }
     if (isset($this->_ci_helpers[$helper])) {
         return;
     }
     list($path, $_helper) = Modules::find("{$helper}_helper", $this->_module, 'helpers/');
     if ($path === false) {
         // If the helper was not found in a module, check for a BF_ prefixed
         // helper in the Bonfire helpers directory.
         if (file_exists(BFPATH . "helpers/BF_{$helper}_helper.php")) {
             include_once BFPATH . "helpers/BF_{$helper}_helper.php";
         }
         parent::helper($helper);
         return $this;
     }
     Modules::load_file($_helper, $path);
     $this->_ci_helpers[$_helper] = true;
     return $this;
 }
コード例 #11
0
ファイル: mod_tasks.php プロジェクト: krus7ev/KMFD
 function __construct()
 {
     //Call the Model constructor
     parent::__construct();
 }
コード例 #12
0
ファイル: Loader.php プロジェクト: randombrad/FUEL-CMS
 /** Load a module helper **/
 public function helper($helper, $module = NULL)
 {
     if (!isset($module)) {
         $module = $this->_module;
     }
     // FUEL
     if (is_array($helper)) {
         return $this->helpers($helper);
     }
     if (isset($this->_ci_helpers[$helper])) {
         return;
     }
     list($path, $_helper) = Modules::find($helper . '_helper', $module, 'helpers/');
     if ($path === FALSE) {
         return parent::helper($helper);
     }
     Modules::load_file($_helper, $path);
     $this->_ci_helpers[$_helper] = TRUE;
 }
コード例 #13
0
ファイル: MY_Loader.php プロジェクト: blekedeg/lbhpers
 /**
  * To accomodate CI 2.1.0, we override the initialize() method instead of
  * the ci_autoloader() method. Once sparks is integrated into CI, we can
  * avoid the awkward version-specific logic.
  *
  * @return \MY_Loader
  */
 public function initialize($controller = null)
 {
     parent::initialize();
     $this->ci_autoloader();
     return $this;
 }
コード例 #14
0
ファイル: MY_Loader.php プロジェクト: emil09/bilis
 function MY_Loader()
 {
     parent::__construct();
     $this->_module = CI::$APP->router->fetch_module();
 }
コード例 #15
0
 function __construct()
 {
     parent::__construct();
     $this->_ci_events_paths = array(APPPATH);
     log_message('debug', "MY_Loader Class Initialized");
 }
コード例 #16
0
ファイル: MY_Loader.php プロジェクト: nosesdive/Dashboard
 /**
  * Prep filename
  * Override from parent
  *
  * This function preps the name of various items to make loading them more reliable.
  *
  * @param	mixed
  * @param 	string
  * @param   bool
  * @return	array
  */
 protected function _ci_prep_filename($filename, $extension, $opposite = false)
 {
     if ($opposite == false) {
         return parent::_ci_prep_filename($filename, $extension);
     }
     // opposite prep in front
     if (!is_array($filename)) {
         return array($extension . ucfirst(str_replace('.php', '', str_replace($extension, '', $filename))));
     } else {
         foreach ($filename as $key => $val) {
             $filename[$key] = $extension . ucfirst(str_replace('.php', '', str_replace($extension, '', $val)));
         }
         return $filename;
     }
 }
コード例 #17
0
 public function initialize()
 {
     parent::initialize();
 }
コード例 #18
0
ファイル: MY_Loader.php プロジェクト: ramonleenders/pyrocms
 /**
  * To accomodate CI 2.1.0, we override the initialize() method instead of
  * the ci_autoloader() method. Once sparks is integrated into CI, we can
  * avoid the awkward version-specific logic.
  *
  * @return \MY_Loader
  */
 function initialize()
 {
     parent::initialize();
     $this->ci_autoloader();
     return $this;
 }
コード例 #19
0
 /**
  * Initializer
  *
  * @param null $controller
  */
 public function initialize($controller = NULL)
 {
     // Load system configuration from database
     $this->_load_db_config();
     parent::initialize($controller);
 }
コード例 #20
0
 public function __construct()
 {
     parent::__construct();
     $this->add_package_path(SHARED_ADDONPATH);
 }
コード例 #21
0
ファイル: MY_Loader.php プロジェクト: ovarz/cobablue
 public function __construct()
 {
     parent::__construct();
 }
コード例 #22
0
ファイル: MY_Loader.php プロジェクト: tuanvu5503/thungrac.vn
 public function __construct()
 {
     parent::__construct();
     require_once FCPATH . 'public/php_function_common/php_function.php';
 }
コード例 #23
0
ファイル: MY_Loader.php プロジェクト: RVRKC/Hackathon_2015
 public function __construct()
 {
     parent::__construct();
     $this->add_package_path(NTS_SYSTEM_APPPATH);
 }
コード例 #24
0
 /**
  * Load helper, check TrafficTower core helpers.
  *
  * @param array $helper Helper name (or list of helpers)
  */
 public function helper($helper = array())
 {
     if (is_array($helper)) {
         return $this->helpers($helper);
     }
     $tt_helpers = $this->_tt_helpers();
     // Check if is TT helper
     $helper = trim($helper, '/');
     if (in_array(strtolower($helper), $tt_helpers)) {
         // Check for app helper
         if (strpos('/', $helper) === FALSE && $this->_app_helper_exists($helper)) {
             // Manual add (due to lowerize capitals in CI core)
             $app_helper = strpos($helper, '.php') === FALSE ? $helper . '_helper.php' : $helper;
             include_once APPPATH . 'helpers/' . $this->app_prefix . $app_helper;
         }
         $helper = '../../traffictower/helpers/' . $helper;
     }
     parent::helper($helper);
 }
コード例 #25
0
ファイル: MY_Loader.php プロジェクト: Rundiz/vee-web-start
 function __construct()
 {
     parent::__construct();
     //
     $this->CI =& get_instance();
 }