_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q16900 | ClassInfoTrait.getRealClassName | train | private function getRealClassName(string $className): string
{
// __CG__: Doctrine Common Marker for Proxy (ODM < 2.0 and ORM < 3.0)
// __PM__: Ocramius Proxy Manager (ODM >= 2.0)
if ((false === $positionCg = strrpos($className, '\\__CG__\\')) &&
| php | {
"resource": ""
} |
q16901 | OperationDataProviderTrait.getItemData | train | private function getItemData($identifiers, array $attributes, array $context)
{
| php | {
"resource": ""
} |
q16902 | OperationDataProviderTrait.getSubresourceData | train | private function getSubresourceData($identifiers, array $attributes, array $context)
{
if (null === $this->subresourceDataProvider) {
throw new RuntimeException('Subresources not supported');
}
| php | {
"resource": ""
} |
q16903 | ApiPlatformExtension.registerSwaggerConfiguration | train | private function registerSwaggerConfiguration(ContainerBuilder $container, array $config, XmlFileLoader $loader): void
{
if (!$config['enable_swagger']) {
return;
}
$loader->load('swagger.xml');
if ($config['enable_swagger_ui'] || $config['enable_re_doc']) {
... | php | {
"resource": ""
} |
q16904 | ApiPlatformExtension.getFormats | train | private function getFormats(array $configFormats): array
{
$formats = [];
foreach ($configFormats as $format => $value) | php | {
"resource": ""
} |
q16905 | JsonLdContextTrait.addJsonLdContext | train | private function addJsonLdContext(ContextBuilderInterface $contextBuilder, string $resourceClass, array &$context, array $data = []): array
{
if (isset($context['jsonld_has_context'])) {
return $data;
}
$context['jsonld_has_context'] = true;
if (isset($context['jsonld_e... | php | {
"resource": ""
} |
q16906 | AddFormatListener.addRequestFormats | train | private function addRequestFormats(Request $request, array $formats): void
{
foreach ($formats as $format => $mimeTypes) {
| php | {
"resource": ""
} |
q16907 | AddFormatListener.getNotAcceptableHttpException | train | private function getNotAcceptableHttpException(string $accept, array $mimeTypes = null): NotAcceptableHttpException
{
if (null === $mimeTypes) {
$mimeTypes = array_keys($this->mimeTypes);
}
return new NotAcceptableHttpException(sprintf(
'Requested | php | {
"resource": ""
} |
q16908 | Reflection.getProperty | train | public function getProperty(string $methodName): ?string
{
$pattern = implode('|', array_merge(self::ACCESSOR_PREFIXES, self::MUTATOR_PREFIXES));
| php | {
"resource": ""
} |
q16909 | Pagination.getOffset | train | public function getOffset(string $resourceClass = null, string $operationName = null, array $context = []): int
{
$graphql = $context['graphql'] ?? false;
$limit = $this->getLimit($resourceClass, $operationName, $context);
if ($graphql && null !== ($after = $this->getParameterFromContext($... | php | {
"resource": ""
} |
q16910 | Pagination.getLimit | train | public function getLimit(string $resourceClass = null, string $operationName = null, array $context = []): int
{
$graphql = $context['graphql'] ?? false;
$limit = $this->options['items_per_page'];
$clientLimit = $this->options['client_items_per_page'];
if (null !== $resourceClass) ... | php | {
"resource": ""
} |
q16911 | Pagination.getPagination | train | public function getPagination(string $resourceClass = null, string $operationName = null, array $context = []): array
{
$page = $this->getPage($context);
$limit = $this->getLimit($resourceClass, $operationName, $context);
if (0 === $limit && 1 < $page) {
throw new InvalidArgumen... | php | {
"resource": ""
} |
q16912 | Pagination.isEnabled | train | public function isEnabled(string $resourceClass = null, string $operationName = null, array $context = []): bool
{
| php | {
"resource": ""
} |
q16913 | Pagination.isPartialEnabled | train | public function isPartialEnabled(string $resourceClass = null, string $operationName = null, array $context = []): bool
{
| php | {
"resource": ""
} |
q16914 | Pagination.getEnabled | train | private function getEnabled(array $context, string $resourceClass = null, string $operationName = null, bool $partial = false): bool
{
$enabled = $this->options[$partial ? 'partial' : 'enabled'];
$clientEnabled = $this->options[$partial ? 'client_partial' : 'client_enabled'];
if (null !== $... | php | {
"resource": ""
} |
q16915 | Pagination.getParameterFromContext | train | private function getParameterFromContext(array $context, string $parameterName, $default = null)
{
$filters = $context['filters'] ?? [];
| php | {
"resource": ""
} |
q16916 | FilterCollectionFactory.createFilterCollectionFromLocator | train | public function createFilterCollectionFromLocator(ContainerInterface $filterLocator): FilterCollection
{
$filters = [];
foreach ($this->filtersIds as $filterId) | php | {
"resource": ""
} |
q16917 | FilterLocatorTrait.setFilterLocator | train | private function setFilterLocator($filterLocator, bool $allowNull = false): void
{
if ($filterLocator instanceof ContainerInterface || $filterLocator instanceof FilterCollection || (null === $filterLocator && $allowNull)) {
if ($filterLocator instanceof FilterCollection) {
@trigg... | php | {
"resource": ""
} |
q16918 | FilterLocatorTrait.getFilter | train | private function getFilter(string $filterId): ?FilterInterface
{
if ($this->filterLocator instanceof ContainerInterface && $this->filterLocator->has($filterId)) {
return $this->filterLocator->get($filterId);
}
| php | {
"resource": ""
} |
q16919 | ValidatorPropertyMetadataFactory.isRequiredByGroups | train | private function isRequiredByGroups(ValidatorPropertyMetadataInterface $validatorPropertyMetadata, array $options): bool
{
foreach ($options['validation_groups'] as $validationGroup) {
if (!\is_string($validationGroup)) {
continue;
}
| php | {
"resource": ""
} |
q16920 | ValidatorPropertyMetadataFactory.isRequired | train | private function isRequired(Constraint $constraint): bool
{
foreach (self::REQUIRED_CONSTRAINTS as $requiredConstraint) {
if ($constraint instanceof $requiredConstraint) | php | {
"resource": ""
} |
q16921 | ItemNormalizer.getPopulatedRelations | train | private function getPopulatedRelations($object, ?string $format, array $context, array $relationships): array
{
$data = [];
if (!isset($context['resource_class'])) {
return $data;
}
unset($context['api_included']);
foreach ($relationships as $relationshipDataArr... | php | {
"resource": ""
} |
q16922 | ItemNormalizer.getRelatedResources | train | private function getRelatedResources($object, ?string $format, array $context, array $relationships): array
{
if (!isset($context['api_included'])) {
return [];
}
$included = [];
foreach ($relationships as $relationshipDataArray) {
if (!\in_array($relationshi... | php | {
"resource": ""
} |
q16923 | ItemNormalizer.getJsonApiCacheKey | train | private function getJsonApiCacheKey(?string $format, array $context)
{
try {
return md5($format.serialize($context));
} catch (\Exception $exception) {
| php | {
"resource": ""
} |
q16924 | RespondListener.onKernelView | train | public function onKernelView(GetResponseForControllerResultEvent $event): void
{
$controllerResult = $event->getControllerResult();
$request = $event->getRequest();
$attributes = RequestAttributesExtractor::extractAttributes($request);
if ($controllerResult instanceof Response && ($... | php | {
"resource": ""
} |
q16925 | SwaggerUiListener.onKernelRequest | train | public function onKernelRequest(GetResponseEvent $event): void
{
$request = $event->getRequest();
if (
'html' !== $request->getRequestFormat('') ||
!($request->attributes->has('_api_resource_class') || $request->attributes->getBoolean('_api_respond', false))
| php | {
"resource": ""
} |
q16926 | HydraContext.getOperation | train | private function getOperation(string $method, string $className): stdClass
{
foreach ($this->getOperations($className) as $operation) {
if ($operation->{'hydra:method'} === $method) {
return $operation;
| php | {
"resource": ""
} |
q16927 | AnnotationFilterExtractorTrait.getFilterAnnotations | train | private function getFilterAnnotations(array $miscAnnotations): \Iterator
{
foreach ($miscAnnotations as $miscAnnotation) {
if (ApiFilter::class === | php | {
"resource": ""
} |
q16928 | AnnotationFilterExtractorTrait.getFilterProperties | train | private function getFilterProperties(ApiFilter $filterAnnotation, \ReflectionClass $reflectionClass, \ReflectionProperty $reflectionProperty = null): array
{
$properties = [];
if ($filterAnnotation->properties) {
foreach ($filterAnnotation->properties as $property => $strategy) {
... | php | {
"resource": ""
} |
q16929 | AnnotationFilterExtractorTrait.readFilterAnnotations | train | private function readFilterAnnotations(\ReflectionClass $reflectionClass, Reader $reader): array
{
$filters = [];
foreach ($this->getFilterAnnotations($reader->getClassAnnotations($reflectionClass)) as $filterAnnotation) {
$filterClass = $filterAnnotation->filterClass;
$id =... | php | {
"resource": ""
} |
q16930 | AnnotationFilterExtractorTrait.generateFilterId | train | private function generateFilterId(\ReflectionClass $reflectionClass, string $filterClass, string $filterId = null): string
{
$suffix = null !== $filterId ? '_'.$filterId : $filterId;
return | php | {
"resource": ""
} |
q16931 | QueryJoinParser.getClassMetadataFromJoinAlias | train | public static function getClassMetadataFromJoinAlias(string $alias, QueryBuilder $queryBuilder, ManagerRegistry $managerRegistry): ClassMetadata
{
@trigger_error(sprintf('The use of "%s::getClassMetadataFromJoinAlias()" is deprecated since 2.4 and will be removed in 3.0. Use "%s::getEntityClassByAlias()" in... | php | {
"resource": ""
} |
q16932 | QueryJoinParser.getJoinRelationship | train | public static function getJoinRelationship(Join $join): string
{
@trigger_error(sprintf('The use of "%s::getJoinRelationship()" is deprecated since 2.3 and will be removed in | php | {
"resource": ""
} |
q16933 | QueryJoinParser.getJoinAlias | train | public static function getJoinAlias(Join $join): string
{
@trigger_error(sprintf('The use of "%s::getJoinAlias()" is deprecated since 2.3 and will be removed in | php | {
"resource": ""
} |
q16934 | QueryJoinParser.getOrderByParts | train | public static function getOrderByParts(OrderBy $orderBy): array
{
@trigger_error(sprintf('The use of "%s::getOrderByParts()" is deprecated since 2.3 and will be removed in | php | {
"resource": ""
} |
q16935 | AddLinkHeaderListener.onKernelResponse | train | public function onKernelResponse(FilterResponseEvent $event): void
{
$apiDocUrl = $this->urlGenerator->generate('api_doc', ['_format' => 'jsonld'], UrlGeneratorInterface::ABS_URL);
$link = new Link(ContextBuilder::HYDRA_NS.'apiDocumentation', $apiDocUrl);
| php | {
"resource": ""
} |
q16936 | RequestParser.parseAndDuplicateRequest | train | public static function parseAndDuplicateRequest(Request $request): Request
{
$query = self::parseRequestParams(self::getQueryString($request) ?? '');
| php | {
"resource": ""
} |
q16937 | RequestParser.parseRequestParams | train | public static function parseRequestParams(string $source): array
{
// '[' is urlencoded ('%5B') in the input, but we must urldecode it in order
// to find it when replacing names with the regexp below.
$source = str_replace('%5B', '[', $source);
$source = preg_replace_callback(
... | php | {
"resource": ""
} |
q16938 | RouteNameGenerator.generate | train | public static function generate(string $operationName, string $resourceShortName, $operationType): string
{
if (OperationType::SUBRESOURCE === $operationType = OperationTypeDeprecationHelper::getOperationType($operationType)) {
throw new InvalidArgumentException('Subresource operations are not s... | php | {
"resource": ""
} |
q16939 | RouteNameGenerator.inflector | train | public static function inflector(string $name, bool $pluralize = true): string
{
$name = Inflector::tableize($name);
| php | {
"resource": ""
} |
q16940 | SearchFilterTrait.normalizeValues | train | protected function normalizeValues(array $values, string $property): ?array
{
foreach ($values as $key => $value) {
if (!\is_int($key) || !\is_string($value)) {
unset($values[$key]);
}
}
if (empty($values)) {
$this->getLogger()->notice('In... | php | {
"resource": ""
} |
q16941 | SearchFilterTrait.hasValidValues | train | protected function hasValidValues(array $values, $type = null): bool
{
foreach ($values as $key => $value) {
if (self::DOCTRINE_INTEGER_TYPE === $type && null !== $value && | php | {
"resource": ""
} |
q16942 | PaginationExtension.shouldDoctrinePaginatorUseOutputWalkers | train | private function shouldDoctrinePaginatorUseOutputWalkers(QueryBuilder $queryBuilder, string $resourceClass = null, string $operationName = null): bool
{
if (null !== $resourceClass) {
$resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
if (null !== $useOutput... | php | {
"resource": ""
} |
q16943 | SearchFilter.addEqualityMatchStrategy | train | private function addEqualityMatchStrategy(string $strategy, string $field, $value, bool $caseSensitive, ClassMetadata $metadata)
{
$type = $metadata->getTypeOfField($field);
switch ($strategy) {
case MongoDbType::STRING !== $type:
return MongoDbType::getType($type)->conv... | php | {
"resource": ""
} |
q16944 | AddLinkHeaderListener.onKernelResponse | train | public function onKernelResponse(FilterResponseEvent $event): void
{
$link = new Link('mercure', $this->hub);
$attributes = $event->getRequest()->attributes;
if (
null === ($resourceClass = $attributes->get('_api_resource_class')) ||
| php | {
"resource": ""
} |
q16945 | IriConverter.generateIdentifiersUrl | train | private function generateIdentifiersUrl(array $identifiers, string $resourceClass): array
{
if (0 === \count($identifiers)) {
throw new InvalidArgumentException(sprintf(
'No identifiers defined for resource of type "%s"',
$resourceClass
));
}
... | php | {
"resource": ""
} |
q16946 | YamlExtractor.phpize | train | private function phpize(array $array, string $key, string $type)
{
if (!isset($array[$key])) {
return null;
}
switch ($type) {
case 'bool':
if (\is_bool($array[$key])) {
return $array[$key];
}
break;... | php | {
"resource": ""
} |
q16947 | AbstractFilter.getProperties | train | protected function getProperties(string $resourceClass): \Traversable
{
if (null !== $this->properties) {
return yield from array_keys($this->properties);
| php | {
"resource": ""
} |
q16948 | AbstractFilter.hasProperty | train | protected function hasProperty(string $resourceClass, string $property): bool
| php | {
"resource": ""
} |
q16949 | AbstractFilter.getMetadata | train | protected function getMetadata(string $resourceClass, string $property): array
{
$noop = [null, null, null, null];
if (!$this->hasProperty($resourceClass, $property)) {
return $noop;
}
$properties = explode('.', $property);
$totalProperties = \count($properties)... | php | {
"resource": ""
} |
q16950 | IriHelper.parseIri | train | public static function parseIri(string $iri, string $pageParameterName): array
{
$parts = parse_url($iri);
if (false === $parts) {
throw new InvalidArgumentException(sprintf('The request URI "%s" is malformed.', $iri));
}
$parameters = [];
if (isset($parts['query... | php | {
"resource": ""
} |
q16951 | IriHelper.createIri | train | public static function createIri(array $parts, array $parameters, string $pageParameterName = null, float $page = null, bool $absoluteUrl = false): string
{
if (null !== $page && null !== $pageParameterName) {
$parameters[$pageParameterName] = $page;
}
$query = http_build_query(... | php | {
"resource": ""
} |
q16952 | CollectionFiltersNormalizer.getSearch | train | private function getSearch(string $resourceClass, array $parts, array $filters): array
{
$variables = [];
$mapping = [];
foreach ($filters as $filter) {
foreach ($filter->getDescription($resourceClass) as $variable => $data) {
$variables[] = $variable;
... | php | {
"resource": ""
} |
q16953 | AbstractItemNormalizer.validateType | train | protected function validateType(string $attribute, Type $type, $value, string $format = null)
{
$builtinType = $type->getBuiltinType();
if (Type::BUILTIN_TYPE_FLOAT === $builtinType && null !== $format && false !== strpos($format, 'json')) {
$isValid = \is_float($value) || \is_int($value... | php | {
"resource": ""
} |
q16954 | AbstractItemNormalizer.denormalizeCollection | train | protected function denormalizeCollection(string $attribute, PropertyMetadata $propertyMetadata, Type $type, string $className, $value, ?string $format, array $context): array
{
if (!\is_array($value)) {
throw new InvalidArgumentException(sprintf(
'The type of the "%s" attribute m... | php | {
"resource": ""
} |
q16955 | AbstractItemNormalizer.denormalizeRelation | train | protected function denormalizeRelation(string $attributeName, PropertyMetadata $propertyMetadata, string $className, $value, ?string $format, array $context)
{
if (\is_string($value)) {
try {
return $this->iriConverter->getItemFromIri($value, $context + ['fetch_data' => true]);
... | php | {
"resource": ""
} |
q16956 | AbstractItemNormalizer.setValue | train | private function setValue($object, string $attributeName, $value)
{
try {
$this->propertyAccessor->setValue($object, $attributeName, $value);
| php | {
"resource": ""
} |
q16957 | AbstractItemNormalizer.getFactoryOptions | train | protected function getFactoryOptions(array $context): array
{
$options = [];
if (isset($context[self::GROUPS])) {
$options['serializer_groups'] = $context[self::GROUPS];
}
if (isset($context['collection_operation_name'])) {
$options['collection_operation_nam... | php | {
"resource": ""
} |
q16958 | AbstractItemNormalizer.normalizeRelation | train | protected function normalizeRelation(PropertyMetadata $propertyMetadata, $relatedObject, string $resourceClass, ?string $format, array $context)
{
if (null === $relatedObject || !empty($context['attributes']) || $propertyMetadata->isReadableLink()) {
if (null === $relatedObject) {
... | php | {
"resource": ""
} |
q16959 | AbstractItemNormalizer.getDataTransformer | train | protected function getDataTransformer($object, string $to, array $context = []): ?DataTransformerInterface
{
foreach ($this->dataTransformers as $dataTransformer) {
if ($dataTransformer->supportsTransformation($object, $to, | php | {
"resource": ""
} |
q16960 | AbstractItemNormalizer.transformOutput | train | protected function transformOutput($object, array $context = [])
{
$outputClass = $this->getOutputClass($this->getObjectClass($object), $context);
| php | {
"resource": ""
} |
q16961 | AttributesExtractor.extractAttributes | train | public static function extractAttributes(array $attributes): array
{
$result = ['resource_class' => $attributes['_api_resource_class'] ?? null];
if ($subresourceContext = $attributes['_api_subresource_context'] ?? null) {
$result['subresource_context'] = $subresourceContext;
}
... | php | {
"resource": ""
} |
q16962 | ValidationExceptionListener.onKernelException | train | public function onKernelException(GetResponseForExceptionEvent $event): void
{
$exception = $event->getException();
if (!$exception instanceof ValidationException) {
return;
}
$format = ErrorFormatGuesser::guessErrorFormat($event->getRequest(), $this->errorFormats);
| php | {
"resource": ""
} |
q16963 | PropertyHelperTrait.addJoinsForNestedProperty | train | protected function addJoinsForNestedProperty(string $property, string $rootAlias, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator/*, string $resourceClass, string $joinType*/): array
{
if (\func_num_args() > 4) {
$resourceClass = func_get_arg(4);
} else {
... | php | {
"resource": ""
} |
q16964 | DateFilter.addMatch | train | private function addMatch(Builder $aggregationBuilder, string $field, string $operator, string $value, string $nullManagement = null): void
{
try {
$value = new \DateTime($value);
} catch (\Exception $e) {
// Silently ignore this filter if it can not be transformed to a \Date... | php | {
"resource": ""
} |
q16965 | SearchFilter.addWhereByStrategy | train | protected function addWhereByStrategy(string $strategy, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $field, $value, bool $caseSensitive)
{
$wrapCase = $this->createWrapCase($caseSensitive);
$valueParameter = $queryNameGenerator->generateParamete... | php | {
"resource": ""
} |
q16966 | SearchFilter.createWrapCase | train | protected function createWrapCase(bool $caseSensitive): \Closure
{
return function (string $expr) use ($caseSensitive): string | php | {
"resource": ""
} |
q16967 | ExtractorPropertyMetadataFactory.createSubresourceMetadata | train | private function createSubresourceMetadata($subresource, PropertyMetadata $propertyMetadata): ?SubresourceMetadata
{
if (!$subresource) {
return null;
}
$type = $propertyMetadata->getType();
$maxDepth = \is_array($subresource) ? $subresource['maxDepth'] ?? null : null;
... | php | {
"resource": ""
} |
q16968 | SchemaBuilder.getQueryFields | train | private function getQueryFields(string $resourceClass, ResourceMetadata $resourceMetadata, string $queryName, $itemConfiguration, $collectionConfiguration): array
{
$queryFields = [];
$shortName = $resourceMetadata->getShortName();
$fieldName = lcfirst('query' === $queryName ? $shortName : $... | php | {
"resource": ""
} |
q16969 | SchemaBuilder.getMutationField | train | private function getMutationField(string $resourceClass, ResourceMetadata $resourceMetadata, string $mutationName): array
{
$shortName = $resourceMetadata->getShortName();
$resourceType = new Type(Type::BUILTIN_TYPE_OBJECT, true, $resourceClass);
$deprecationReason = $resourceMetadata->getGr... | php | {
"resource": ""
} |
q16970 | SchemaBuilder.convertType | train | private function convertType(Type $type, bool $input, ?string $queryName, ?string $mutationName, int $depth = 0)
{
switch ($builtinType = $type->getBuiltinType()) {
case Type::BUILTIN_TYPE_BOOL:
$graphqlType = GraphQLType::boolean();
break;
case Type::... | php | {
"resource": ""
} |
q16971 | SchemaBuilder.getResourceObjectTypeFields | train | private function getResourceObjectTypeFields(?string $resourceClass, ResourceMetadata $resourceMetadata, bool $input, ?string $queryName, ?string $mutationName, int $depth = 0, ?array $ioMetadata = null): array
{
$fields = [];
$idField = ['type' => GraphQLType::nonNull(GraphQLType::id())];
$... | php | {
"resource": ""
} |
q16972 | SchemaBuilder.getResourcePaginatedCollectionType | train | private function getResourcePaginatedCollectionType(GraphQLType $resourceType): GraphQLType
{
$shortName = $resourceType->name;
if (isset($this->graphqlTypes["{$shortName}Connection"])) {
return $this->graphqlTypes["{$shortName}Connection"];
}
$edgeObjectTypeConfigurati... | php | {
"resource": ""
} |
q16973 | ApiPlatformProvider.getApiDoc | train | private function getApiDoc(bool $collection, string $resourceClass, ResourceMetadata $resourceMetadata, string $operationName, array $resourceHydraDoc, array $entrypointHydraDoc = []): ApiDoc
{
if ($collection) {
$method = $this->operationMethodResolver->getCollectionOperationMethod($resourceCla... | php | {
"resource": ""
} |
q16974 | ApiPlatformProvider.getResourceHydraDoc | train | private function getResourceHydraDoc(array $hydraApiDoc, string $prefixedShortName): ?array
{
if (!isset($hydraApiDoc['hydra:supportedClass']) || !\is_array($hydraApiDoc['hydra:supportedClass'])) {
return null;
}
foreach ($hydraApiDoc['hydra:supportedClass'] as | php | {
"resource": ""
} |
q16975 | ApiPlatformProvider.getOperationHydraDoc | train | private function getOperationHydraDoc(string $method, array $hydraDoc): array
{
if (!isset($hydraDoc['hydra:supportedOperation']) || !\is_array($hydraDoc['hydra:supportedOperation'])) {
return [];
}
foreach ($hydraDoc['hydra:supportedOperation'] as | php | {
"resource": ""
} |
q16976 | ApiPlatformProvider.getCollectionOperationHydraDoc | train | private function getCollectionOperationHydraDoc(string $shortName, string $method, array $hydraEntrypointDoc): array
{
if (!isset($hydraEntrypointDoc['hydra:supportedProperty']) || !\is_array($hydraEntrypointDoc['hydra:supportedProperty'])) {
return [];
}
$propertyName = '#Entry... | php | {
"resource": ""
} |
q16977 | ItemNormalizer.populateRelation | train | private function populateRelation(array $data, $object, ?string $format, array $context, array $components, string $type): array
{
$class = $this->getObjectClass($object);
$attributesMetadata = \array_key_exists($class, $this->attributesMetadataCache) ?
$this->attributesMetadataCache[$c... | php | {
"resource": ""
} |
q16978 | ItemNormalizer.getRelationIri | train | private function getRelationIri($rel): string
{
if (!(\is_array($rel) || \is_string($rel))) {
| php | {
"resource": ""
} |
q16979 | SerializerPropertyMetadataFactory.getPropertySerializerGroups | train | private function getPropertySerializerGroups(string $resourceClass, string $property): array
{
$serializerClassMetadata = $this->serializerClassMetadataFactory->getMetadataFor($resourceClass);
foreach ($serializerClassMetadata->getAttributesMetadata() as $serializerAttributeMetadata) {
| php | {
"resource": ""
} |
q16980 | SerializerPropertyMetadataFactory.getResourceSerializerGroups | train | private function getResourceSerializerGroups(string $resourceClass): array
{
$serializerClassMetadata = $this->serializerClassMetadataFactory->getMetadataFor($resourceClass);
$groups = [];
| php | {
"resource": ""
} |
q16981 | WriteListener.getManager | train | private function getManager(string $resourceClass, $data): ?ObjectManager
{
$objectManager = $this->managerRegistry->getManagerForClass($resourceClass);
if | php | {
"resource": ""
} |
q16982 | PropertyMetadata.withType | train | public function withType(Type $type): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16983 | PropertyMetadata.withDescription | train | public function withDescription(string $description): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16984 | PropertyMetadata.withReadable | train | public function withReadable(bool $readable): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16985 | PropertyMetadata.withWritable | train | public function withWritable(bool $writable): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16986 | PropertyMetadata.withRequired | train | public function withRequired(bool $required): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16987 | PropertyMetadata.withWritableLink | train | public function withWritableLink(bool $writableLink): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16988 | PropertyMetadata.withReadableLink | train | public function withReadableLink(bool $readableLink): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16989 | PropertyMetadata.withIdentifier | train | public function withIdentifier(bool $identifier): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16990 | PropertyMetadata.withChildInherited | train | public function withChildInherited(string $childInherited): self
{
| php | {
"resource": ""
} |
q16991 | PropertyMetadata.withSubresource | train | public function withSubresource(SubresourceMetadata $subresource = null): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16992 | PropertyMetadata.withInitializable | train | public function withInitializable(bool $initializable): self
{
$metadata = clone $this;
| php | {
"resource": ""
} |
q16993 | DocumentationNormalizer.addPaths | train | private function addPaths(bool $v3, \ArrayObject $paths, \ArrayObject $definitions, string $resourceClass, string $resourceShortName, ResourceMetadata $resourceMetadata, array $mimeTypes, string $operationType, \ArrayObject $links)
{
if (null === $operations = OperationType::COLLECTION === $operationType ? ... | php | {
"resource": ""
} |
q16994 | DocumentationNormalizer.getPath | train | private function getPath(string $resourceShortName, string $operationName, array $operation, string $operationType): string
{
$path = $this->operationPathResolver->resolveOperationPath($resourceShortName, $operation, $operationType, $operationName);
| php | {
"resource": ""
} |
q16995 | DocumentationNormalizer.getPathOperation | train | private function getPathOperation(bool $v3, string $operationName, array $operation, string $method, string $operationType, string $resourceClass, ResourceMetadata $resourceMetadata, array $mimeTypes, \ArrayObject $definitions, \ArrayObject $links): \ArrayObject
{
$pathOperation = new \ArrayObject($operatio... | php | {
"resource": ""
} |
q16996 | DocumentationNormalizer.getDefinitionSchema | train | private function getDefinitionSchema(bool $v3, string $resourceClass, ResourceMetadata $resourceMetadata, \ArrayObject $definitions, array $serializerContext = null): \ArrayObject
{
$definitionSchema = new \ArrayObject(['type' => 'object']);
if (null !== $description = $resourceMetadata->getDescrip... | php | {
"resource": ""
} |
q16997 | DocumentationNormalizer.getPropertySchema | train | private function getPropertySchema(bool $v3, PropertyMetadata $propertyMetadata, \ArrayObject $definitions, array $serializerContext = null): \ArrayObject
{
$propertySchema = new \ArrayObject($propertyMetadata->getAttributes()[$v3 ? 'openapi_context' : 'swagger_context'] ?? []);
if (false === $prop... | php | {
"resource": ""
} |
q16998 | DocumentationNormalizer.getType | train | private function getType(bool $v3, string $type, bool $isCollection, ?string $className, ?bool $readableLink, \ArrayObject $definitions, array $serializerContext = null): array
{
if ($isCollection) {
return ['type' => 'array', 'items' => $this->getType($v3, $type, false, $className, $readableLin... | php | {
"resource": ""
} |
q16999 | DocumentationNormalizer.getFiltersParameters | train | private function getFiltersParameters(bool $v3, string $resourceClass, string $operationName, ResourceMetadata $resourceMetadata, \ArrayObject $definitions, array $serializerContext = null): array
{
if (null === $this->filterLocator) {
return [];
}
$parameters = [];
$res... | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.