public function __construct($entity) { if (!is_object($entity)) { throw new \RuntimeException('The value provided is not a Class'); } $this->reflectionEntity = new \ReflectionClass(get_class($entity)); }