setName($name); $reflectionClass = new \ReflectionClass($center); $reflectionId = $reflectionClass->getProperty('id'); $reflectionId->setAccessible(true); $reflectionId->setValue($center, $id); return $center; } }