Exemplo n.º 1
0
 /**
  * Set the rowset data based on a named array/hash
  *
  * @param   array   $data     An associative array of data
  * @param   boolean $modified If TRUE, update the modified information for each column being set. Default TRUE
  * @return  Library\DatabaseRowsetAbstract
  */
 public function setData($data, $modified = true)
 {
     //Set the data in the rows
     if (isset($data[$this->getIdentifier()->name])) {
         foreach ($data[$this->getIdentifier()->name] as $key => $data) {
             $this->_object_set->offsetGet($key)->setData($data, $modified);
         }
     } else {
         parent::setData($data, $modified);
     }
     return $this;
 }