Reference
C
Class

ApiPlatform\Metadata\Extractor\AbstractResourceExtractor

Base file extractor.

class ApiPlatform\Metadata\Extractor\AbstractResourceExtractor implements `<a href="/docs/reference/Metadata/Extractor/ResourceExtractorInterface">ApiPlatform\Metadata\Extractor\ResourceExtractorInterface</a>`
{
    public __construct(array&lt;int, string&gt; $paths, null|Psr\Container\ContainerInterface $container)
    public getResources(): array
    protected extractPath(string $path): null
    protected resolve($value)
}
class ApiPlatform\Metadata\Extractor\AbstractResourceExtractor implements `<a href="/docs/reference/Metadata/Extractor/ResourceExtractorInterface">ApiPlatform\Metadata\Extractor\ResourceExtractorInterface</a>`
{
    public __construct(array&lt;int, string&gt; $paths, null|Psr\Container\ContainerInterface $container)
    public getResources(): array
    protected extractPath(string $path): null
    protected resolve($value)
}

Properties

resources

array $resources
array $resources

paths

array $paths
array $paths

Methods

__construct

public __construct(array&lt;int, string&gt; $paths, null|Psr\Container\ContainerInterface $container)
public __construct(array&lt;int, string&gt; $paths, null|Psr\Container\ContainerInterface $container)

Parameters

pathsarray<int, string>
containerPsr\Container\ContainerInterface

getResources

Parses all metadata files and convert them in an array.

public getResources(): array
public getResources(): array

Returns

array

extractPath

Extracts metadata from a given path.

protected extractPath(string $path): null
protected extractPath(string $path): null

Parameters

pathstring

Returns

null

resolve

Recursively replaces placeholders with the service container parameters.

protected resolve($value)
protected resolve($value)

Parameters

valueThe source which might contain "%placeholders%"

Returns

See also

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop