Example #1
0
 public static function fetch($var)
 {
     if (self::support() == "apc") {
         if (self::apcSupport()) {
             return apc_fetch($var);
         } else {
             kernel::throwException("APC enabled but not available");
             return false;
         }
     } elseif (self::support() == "memcached") {
         if (self::memcachedSupport) {
             return memcached::get($var);
         } else {
             kernel::throwException("Memcached enabled but not available");
             return false;
         }
     }
 }
Example #2
0
 /**
  * Register Modules
  *
  * Includes Module $module and creates a new Instance of the Class which is
  * placed in that file
  *
  * @param  string $module
  * @return boolean
  */
 private function registerModule($module)
 {
     if (!file_exists(dirname(__FILE__) . '/modules/' . $module . '.php')) {
         return kernel::throwException("Failed to load module: " . $module);
     } else {
         require_once dirname(__FILE__) . '/modules/' . $module . '.php';
         $this->_module[$module] = new $module();
         return true;
     }
 }