modelRegistry = $modelRegistry; } public function describe(Type $type, Schema $property, array $groups = null) { $type = new Type($type->getBuiltinType(), false, $type->getClassName(), $type->isCollection(), $type->getCollectionKeyType(), $type->getCollectionValueType()); // ignore nullable field $property->setRef( $this->modelRegistry->register(new Model($type, $groups)) ); } public function supports(Type $type): bool { return Type::BUILTIN_TYPE_OBJECT === $type->getBuiltinType(); } }