Example #1
0
 public function __controller(array $path)
 {
     if (count($path) > 3 && $path[count($path) - 2] == 'page') {
         if (end($path) == 'all') {
             $this->npp = 99999999;
             $this->page = 1;
         } else {
             $this->page = end($path);
         }
     }
     $this->set_view();
     if (ini::get('mysql', 'database', false)) {
         $this->set_page();
     }
     \core::$page_config->add_body_class('module_' . _get::__namespace($this, 0), $this->view);
 }
Example #2
0
 /**
  *
  */
 public static function default_connection()
 {
     _db::connect(ini::get('mysql', 'server'), ini::get('mysql', 'database'), ini::get('mysql', 'username'), ini::get('mysql', 'password'));
 }
Example #3
0
 public static function default_connection()
 {
     _cache::connect(ini::get('memcached', 'instance'), ini::get('memcached', 'server'), ini::get('memcached', 'port'));
 }
Example #4
0
 /**
  * Read a variable from the sites ini file.
  * @param string $key
  * @param string $block
  * @param mixed $default
  * @return mixed
  * @depreciated
  */
 public static function ini($key, $block = 'site', $default = null)
 {
     return ini::get($block, $key, $default);
 }