Beispiel #1
0
 public function __construct($params = array())
 {
     $this->_ci = get_instance();
     // Codeigniter instance
     self::$instance = $this;
     // Instance of this class
     // Driver library only available on CI 2.0+
     if (CI_VERSION >= 2.0) {
         $this->_ci->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
     }
     $this->_ci->load->database();
     $this->_ci->load->helper('directory');
     $this->_ci->load->helper('file');
     // Set the plugins directory if passed via paramater
     if (array_key_exists('plugins_dir', $params)) {
         $this->set_plugin_dir($params['plugins_dir']);
     } else {
         $this->set_plugin_dir(FCPATH . "plugins/");
     }
     // Remove index.php string on the plugins directory if any
     $this->plugins_dir = str_replace("index.php", "", $this->plugins_dir);
     $this->find_plugins();
     // Find all plugins
     $this->get_activated_plugins();
     // Get all activated plugins
     $this->get_plugin_infos();
     // Gets information about all plugins and stores it
     $this->include_plugins();
     // Include plugins
     self::$messages = "";
     // Clear messages
     self::$errors = "";
     // Clear errors
 }
Beispiel #2
0
 /**
  * Constructor
  * 
  * @param mixed $params
  * @return Plugins
  */
 public function __construct($params = array())
 {
     // Codeigniter instance
     $this->_ci =& get_instance();
     $this->_ci->load->database();
     $this->_ci->load->helper('directory');
     $this->_ci->load->helper('file');
     $this->_ci->load->helper('url');
     // Set the plugins directory if passed via paramater
     if (array_key_exists('plugins_dir', $params)) {
         $this->set_plugin_dir($params['plugins_dir']);
     } else {
         $basepath = str_replace("\\", "/", FCPATH);
         $this->set_plugin_dir($basepath . "plugins/");
     }
     // Remove index.php string on the plugins directory if any
     $this->plugins_dir = str_replace("index.php", "", $this->plugins_dir);
     // Find all plugins
     $this->find_plugins();
     // Get all activated plugins
     $this->get_activated_plugins();
     // Include plugins
     $this->include_plugins();
     self::$messages = "";
     // Clear messages
     self::$errors = "";
     // Clear errors
 }
 public function __construct()
 {
     $this->_ci = get_instance();
     // Codeigniter instance
     self::$instance = $this;
     // Instance of this class
     $this->_ci->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
     $this->_ci->load->helper('directory');
     $this->_ci->load->helper('file');
     // Set the plugins directory if not already set
     if (is_null($this->plugins_dir)) {
         $this->plugins_dir = FCPATH . "plugins/";
     }
     $this->find_plugins();
     // Find all plugins
     $this->get_activated_plugins();
     // Get all activated plugins
     $this->get_plugin_infos();
     // Gets information about all plugins and stores it
     $this->include_plugins();
     // Include plugins
     self::$messages = "";
     // Clear messages
     self::$errors = "";
     // Clear errors
 }
Beispiel #4
0
 /**
 * Constructor
 * 
 * @param mixed $params
 * @return Plugins
 */
 public function __construct($params = array())
 {
     $this->_ci      = get_instance(); // Codeigniter instance
     self::$instance = $this;          // Instance of this class
     
     $this->_ci->load->database();
     $this->_ci->load->helper('directory');
     $this->_ci->load->helper('file');
     $this->_ci->load->helper('url');
     
     // Set the plugins directory if passed via paramater
     if (array_key_exists('plugins_dir', $params))
     {
     	$this->set_plugin_dir($params['plugins_dir']);
     }
     else // else set to default value
     {
     	$this->set_plugin_dir(FCPATH . "plugins");
     }
     
     // Remove index.php string on the plugins directory if any
     $this->plugins_dir = str_replace("index.php", "", $this->plugins_dir);      
             
     $this->find_plugins();          // Find all plugins
     $this->get_activated_plugins(); // Get all activated plugins
     $this->get_plugin_infos();      // Gets information about all plugins and stores it
     $this->include_plugins();       // Include plugins
     
     self::$messages = ""; // Clear messages
     self::$errors   = ""; // Clear errors                      
 }