Ejemplo n.º 1
0
 public function __construct()
 {
     $this->app = C::app();
     $this->setting =& $this->app->var['setting'];
     $this->group =& $this->app->var['group'];
     $this->member =& $this->app->var['member'];
     parent::__construct();
 }
Ejemplo n.º 2
0
 public function __construct($para = array())
 {
     if (!empty($para)) {
         $this->_table = $para['table'];
         $this->_pk = $para['pk'];
     }
     if (isset($this->_pre_cache_key) && (($ttl = getglobal('setting/memory/' . $this->_table)) !== null || ($ttl = $this->_cache_ttl) !== null) && memory('check')) {
         $this->_cache_ttl = $ttl;
         $this->_allowmem = true;
     }
     parent::__construct();
 }
Ejemplo n.º 3
0
 public function __construct($para = array())
 {
     if (!empty($para)) {
         $this->_table = $para['table'];
         $this->_pk = $para['pk'];
     }
     //如果 $this->_table 和 $this->_pk 不为空 则统一加上缓存
     if (!isset($this->_pre_cache_key) && !empty($this->_table) && !empty($this->_pk)) {
         $this->_pre_cache_key = $this->_table . '_';
         if ($ttl = getglobal('setting/memory/' . $this->_table) == null) {
             $this->_cache_ttl = 86400;
             //默认缓存一天
         }
     }
     if (isset($this->_pre_cache_key) && (($ttl = getglobal('setting/memory/' . $this->_table)) !== null || ($ttl = $this->_cache_ttl) !== null) && memory('check')) {
         $this->_cache_ttl = $ttl;
         $this->_allowmem = true;
     }
     $this->_init_extend();
     parent::__construct();
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 5
0
 public function __set($name, $value)
 {
     if (isset($this->_obj) && property_exists($this->_obj, $name) === true) {
         return $this->_obj->{$name} = $value;
     } else {
         return parent::__set($name, $value);
     }
 }