protected function doCreateObject(array $array) { $obj = new \woo\domain\Event($array['id']); $obj->setstart($array['start']); $obj->setduration($array['duration']); $obj->setname($array['name']); $space_mapper = new SpaceMapper(); $space = $space_mapper->find($array['space']); $obj->setSpace($space); return $obj; }
function createObject(array $array) { $class = '\\woo\\domain\\Event'; $old = $this->getFromMap($class, $array['id']); $obj = new $class($array['id']); $obj->setstart($array['start']); $obj->setduration($array['duration']); $obj->setname($array['name']); $space_mapper = new SpaceMapper(); $space = $space_mapper->find($array['space']); $obj->setSpace($space); return $obj; }