public function newObject($id) { $object = new Object(null, $this->getJarves()); $object->setId($id); $this->addObject($id); return $object; }