public function populate(array $data)
    {
        foreach ($data as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
        return $this;
    }
public function populate(array $data)
    {
        foreach ($data as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
        return $this;
    }
public function populate ( array $ data ) { foreach ( $ data as $ property => $ value ) { if ( property_exists ( $ this , $ property ) ) { $ this -> { $ property } = $ value ; } } return $ this ; }
Populates the current model with the data provided.

@param array $data

@return $this;
Populates the current model with the data provided .