Exemple #1
0
 /**
  * @static
  * @return CacheFactory
  */
 public static function getInstance()
 {
     if (!isset(self::$factory)) {
         self::$factory = new DefaultCacheFactory();
     }
     return self::$factory;
 }
Exemple #2
0
 public static function getInstance()
 {
     if (!static::$instance) {
         static::$instance = CacheFactory::factory();
     }
     return static::$instance;
 }
Exemple #3
0
 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();
 }
Exemple #4
0
 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);
 }
Exemple #5
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();
 }
Exemple #6
0
Fichier : Boot.php Projet : jyht/v5
 public static function init($options = array())
 {
     return CacheFactory::factory($options);
 }