ORM::hydrate PHP Method

hydrate() public method

This will usually be called only from inside the class, but it's public in case you need to call it directly.
public hydrate ( $data = [] )
    public function hydrate($data = array())
    {
        $this->_data = $data;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Hydrate this model instance with an associative array of data.
  * WARNING: The keys in the array MUST match with columns in the
  * corresponding database table. If any keys are supplied which
  * do not match up with columns, the database will throw an error.
  *
  * @param  Array $data
  * @return void
  */
 public function hydrate($data)
 {
     $this->orm->hydrate($data)->force_all_dirty();
 }
ORM