protected function _restoreFromArray(array $spec)
    {
        foreach ($spec as $key => $value) {
            if (property_exists($this, $key)) {
                $this->{$key} = $value;
            }
        }
    }
protected function _restoreFromArray(array $spec)
    {
        foreach ($spec as $key => $value) {
            if (property_exists($this, $key)) {
                $this->{$key} = $value;
            }
        }
    }
protected function _restoreFromArray ( array $ spec ) { foreach ( $ spec as $ key => $ value ) { if ( property_exists ( $ this , $ key ) ) { $ this -> { $ key } = $ value ; } } }
Restore object state from array

@param  array $spec
@return void
Restore object state from array