Example #1
0
 public function getRecord()
 {
     if ($this->_record === null && !empty($this->record)) {
         $fields = unserialize($this->record);
         $class = Registry::getClassName($this->table);
         $record = new $class($this->_table);
         foreach ($fields as $k => $v) {
             $record->{$k} = $v;
         }
         $this->_record = $record;
     }
     return $this->_record;
 }