PropertyInfoCacheExtractor
in package
implements
PropertyInfoExtractorInterface, PropertyInitializableExtractorInterface
Adds a PSR-6 cache layer on top of an extractor.
Tags
Table of Contents
Interfaces
- PropertyInfoExtractorInterface
- Gets info about PHP class properties.
- PropertyInitializableExtractorInterface
- Guesses if the property can be initialized through the constructor.
Properties
- $arrayCache : array<string|int, mixed>
- $cacheItemPool : CacheItemPoolInterface
- $propertyInfoExtractor : PropertyInfoExtractorInterface
Methods
- __construct() : mixed
- getLongDescription() : string|null
- Gets the long description of the property.
- getProperties() : array<string|int, string>|null
- Gets the list of properties available for the given class.
- getShortDescription() : string|null
- Gets the short description of the property.
- getType() : Type|null
- getTypes() : array<string|int, Type>|null
- Gets types of a property.
- isInitializable() : bool|null
- Is the property initializable? Returns true if a constructor's parameter matches the given property name.
- isReadable() : bool|null
- Is the property readable?
- isWritable() : bool|null
- Is the property writable?
- extract() : mixed
- Retrieves the cached data if applicable or delegates to the decorated extractor.
Properties
$arrayCache
private
array<string|int, mixed>
$arrayCache
= []
$cacheItemPool read-only
private
CacheItemPoolInterface
$cacheItemPool
$propertyInfoExtractor read-only
private
PropertyInfoExtractorInterface
$propertyInfoExtractor
Methods
__construct()
public
__construct(PropertyInfoExtractorInterface $propertyInfoExtractor, CacheItemPoolInterface $cacheItemPool) : mixed
Parameters
- $propertyInfoExtractor : PropertyInfoExtractorInterface
- $cacheItemPool : CacheItemPoolInterface
getLongDescription()
Gets the long description of the property.
public
getLongDescription(string $class, string $property[, array<string|int, mixed> $context = [] ]) : string|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
string|nullgetProperties()
Gets the list of properties available for the given class.
public
getProperties(string $class[, array<string|int, mixed> $context = [] ]) : array<string|int, string>|null
Parameters
- $class : string
- $context : array<string|int, mixed> = []
Return values
array<string|int, string>|nullgetShortDescription()
Gets the short description of the property.
public
getShortDescription(string $class, string $property[, array<string|int, mixed> $context = [] ]) : string|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
string|nullgetType()
public
getType(string $class, string $property[, array<string|int, mixed> $context = [] ]) : Type|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
Type|nullgetTypes()
Gets types of a property.
public
getTypes(string $class, string $property[, array<string|int, mixed> $context = [] ]) : array<string|int, Type>|null
since Symfony 7.3, use "getType" instead
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
array<string|int, Type>|nullisInitializable()
Is the property initializable? Returns true if a constructor's parameter matches the given property name.
public
isInitializable(string $class, string $property[, array<string|int, mixed> $context = [] ]) : bool|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
bool|nullisReadable()
Is the property readable?
public
isReadable(string $class, string $property[, array<string|int, mixed> $context = [] ]) : bool|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
bool|nullisWritable()
Is the property writable?
public
isWritable(string $class, string $property[, array<string|int, mixed> $context = [] ]) : bool|null
Parameters
- $class : string
- $property : string
- $context : array<string|int, mixed> = []
Return values
bool|nullextract()
Retrieves the cached data if applicable or delegates to the decorated extractor.
private
extract(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>