Example #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->https_enabled = FALSE;
     // Hook into routing
     Event::add_after('system.routing', array('Router', 'find_uri'), array($this, 'verify_https_mode'));
     Event::add_after('system.routing', array('Router', 'setup'), array($this, 'rewrite_url'));
 }
 /**
  * Adds the register method to load after the find_uri Router method.
  */
 public function __construct()
 {
     // Hook into routing
     if (Kohana::config('config.installer_check') == FALSE or file_exists(DOCROOT . "application/config/database.php")) {
         Event::add_after('system.routing', array('Router', 'find_uri'), array($this, 'register'));
     }
     // Set Table Prefix
     $this->table_prefix = Kohana::config('database.default.table_prefix');
 }
 /**
  * Registers the main event add method
  */
 public function __construct()
 {
     // Dirty hack to load this plugin before the current theme, but after default
     $modules = Kohana::config('core.modules');
     $sharing_path = PLUGINPATH . 'sharing_two';
     unset($modules[array_search($sharing_path, $modules)]);
     $d_index = array_search(THEMEPATH . "default", $modules);
     $modules = array_merge(array_slice($modules, 0, $d_index), array($sharing_path), array_slice($modules, $d_index));
     Kohana::config_set('core.modules', $modules);
     // Try to alter routing now
     Sharing::routing();
     // hook into routing - in case we're running too early
     Event::add_after('system.routing', array('Router', 'find_uri'), array('Sharing', 'routing'));
     //  Add other events just before controller runs
     Event::add('system.pre_controller', array($this, 'add'));
 }
Example #4
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->https_enabled = Kohana::config('core.site_protocol');
     // Hook into routing
     Event::add_after('system.routing', array('Router', 'setup'), array($this, 'rewrite_url'));
 }