Пример #1
0
 public function load()
 {
     $this->_logger()->debug(__CLASS__ . '::' . __METHOD__);
     $sql = "select * from comments where comment_id = ? limit 1";
     $data = $this->_db()->getRow($sql, array($this->_id));
     $data['name'] = TextUtilities::escape($data['name']);
     $data['comment'] = TextUtilities::escape($data['comment']);
     return $data;
 }
Пример #2
0
 public function __set($var, $value)
 {
     $func = "set" . TextUtilities::underscoreToCamelCase($var);
     if (method_exists($this, $func)) {
         $value = $this->{$func}($value);
     }
     $this->_data[$var] = $value;
     // since data will be set to the database, we need to invalidate this
     // object so that it can be refreshed by the next client.
     $this->_invalidate();
 }