Пример #1
0
 public function afterload()
 {
     parent::afterload();
     date_default_timezone_set($this->timezone);
     $this->gmt = date('Z');
     if (!defined('dbversion')) {
         define('dbversion', true);
     }
 }
Пример #2
0
 public function __get($name)
 {
     if (isset($this->mapoptions[$name])) {
         $prop = $this->mapoptions[$name];
         if (is_array($prop)) {
             list($classname, $method) = $prop;
             return call_user_func_array(array(getinstance($classname), $method), array($name));
         }
         return litepublisher::$options->data[$prop];
     }
     return parent::__get($name);
 }
Пример #3
0
 public function __get($name)
 {
     if (method_exists($this, $get = 'get' . $name)) {
         return $this->{$get}();
     }
     if (array_key_exists($name, $this->data)) {
         return $this->data[$name];
     }
     if (preg_match('/^sidebar(\\d)$/', $name, $m)) {
         $widgets = twidgets::i();
         return $widgets->getsidebarindex($this->context, $this->view, (int) $m[1]);
     }
     if (array_key_exists($name, $this->data['tags'])) {
         $tags = ttemplatetags::i();
         return $tags->{$name};
     }
     if (isset($this->context) && isset($this->context->{$name})) {
         return $this->context->{$name};
     }
     return parent::__get($name);
 }
 protected function create()
 {
     parent::create();
     $this->basename = 'commentmanager';
     $this->addevents('onchanged', 'approved', 'comuseradded', 'is_spamer', 'oncreatestatus');
 }