ReflectionExtractor
class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTypeExtractorInterface, PropertyAccessExtractorInterface
Извлекает данные с помощью API рефлексии.
Свойства
| static | $defaultMutatorPrefixes | ||
| static | $defaultAccessorPrefixes | ||
| static | $defaultArrayMutatorPrefixes |
Методы
| __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null) | ||
| string[]|null | getProperties(string $class, array $context = array()) Получает список свойств, доступных для данного класса. | |
| Type[]|null | getTypes(string $class, string $property, array $context = array()) Получает типы свойства. | |
| bool|null | isReadable(string $class, string $property, array $context = array()) Доступно ли свойство для чтения? | |
| bool|null | isWritable(string $class, string $property, array $context = array()) Доступно ли свойство для записи? |
Подробности
__construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null)
Параметры
| array | $mutatorPrefixes | |
| array | $accessorPrefixes | |
| array | $arrayMutatorPrefixes |
string[]|null getProperties(string $class, array $context = array())
Получает список свойств, доступных для данного класса.
Параметры
| string | $class | |
| array | $context |
Значение возврата
| string[]|null |
Type[]|null getTypes(string $class, string $property, array $context = array())
Получает типы свойства.
Параметры
| string | $class | |
| string | $property | |
| array | $context |
Значение возврата
| Type[]|null |
bool|null isReadable(string $class, string $property, array $context = array())
Доступно ли свойство для чтения?
Параметры
| string | $class | |
| string | $property | |
| array | $context |
Значение возврата
| bool|null |
bool|null isWritable(string $class, string $property, array $context = array())
Доступно ли свойство для записи?
Параметры
| string | $class | |
| string | $property | |
| array | $context |
Значение возврата
| bool|null |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.4/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.html