/** * @static * @return CacheFactory */ public static function getInstance() { if (!isset(self::$factory)) { self::$factory = new DefaultCacheFactory(); } return self::$factory; }
public static function getInstance() { if (!static::$instance) { static::$instance = CacheFactory::factory(); } return static::$instance; }
public function __construct() { $this->Session = Session::getInstance(); $this->Rules = Rules::getInstance(); $this->Cache = CacheFactory::factory(); $this->tables = Config::read('modules.Session.User.Auth.tables'); $this->auths = array(); }
public function execute() { $this->rules = array(); $Sql = Doctrine_Query::create()->select('id, name')->from('Rule'); while ($data = $Sql->fetchArray()) { $this->rules[$data['id']] = $data['name']; } CacheFactory::factory()->store('system/rulesList', $this->rules, 0); }
private function __construct() { $this->Cache = CacheFactory::factory(); $this->Session = Session::getInstance(); $this->table = Config::read('modules.Session.User.table'); $this->anon_id = Config::read('modules.Session.User.anonymous_id'); $this->autolog = (bool) Config::read('modules.Session.User.Autologin.' . 'enabled'); if (Config::read('modules.Session.User.Auth.enabled') === true) { $this->Auth = new Auths(); } $this->loadUser(); }
public static function init($options = array()) { return CacheFactory::factory($options); }