Пример #1
0
 /**
  * Load data to row
  * @param array $data
  * @return Row
  */
 public function loadRow($data, $newInstance = false)
 {
     if ($data instanceof Row) {
         return $data;
     }
     if (!is_array($data)) {
         $data = array();
     }
     if ($newInstance) {
         $row = $this->table->row();
         $row->init($data);
         return $row;
     }
     if (null === $this->row) {
         $this->row = $this->table->row();
     }
     $this->row->init($data);
     return $this->row;
 }