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