PhpDocExtractor
in package
implements
PropertyDescriptionExtractorInterface, PropertyTypeExtractorInterface
Extracts data using a PHPDoc parser.
Tags
Interfaces, Classes, Traits and Enums
- PropertyDescriptionExtractorInterface
- Guesses the property's human readable description.
- PropertyTypeExtractorInterface
- Type Extractor Interface.
Table of Contents
- ACCESSOR = 1
- MUTATOR = 2
- PROPERTY = 0
- $accessorPrefixes : mixed
- $arrayMutatorPrefixes : mixed
- $contextFactory : mixed
- $contexts : array<string|int, Context>
- $docBlockFactory : mixed
- $docBlocks : array<string|int, DocBlock>
- $mutatorPrefixes : mixed
- $phpDocTypeHelper : mixed
- __construct() : mixed
- getLongDescription() : string|null
- Gets the long description of the property.
- getShortDescription() : string|null
- Gets the short description of the property.
- getTypes() : array<string|int, Type>|null
- Gets types of a property.
- createFromReflector() : Context
- Prevents a lot of redundant calls to ContextFactory::createForNamespace().
- getDocBlock() : array<string|int, mixed>
- getDocBlockFromMethod() : array<string|int, mixed>|null
- getDocBlockFromProperty() : DocBlock|null
Constants
ACCESSOR
public
mixed
ACCESSOR
= 1
MUTATOR
public
mixed
MUTATOR
= 2
PROPERTY
public
mixed
PROPERTY
= 0
Properties
$accessorPrefixes
private
mixed
$accessorPrefixes
$arrayMutatorPrefixes
private
mixed
$arrayMutatorPrefixes
$contextFactory
private
mixed
$contextFactory
$contexts
private
array<string|int, Context>
$contexts
= []
$docBlockFactory
private
mixed
$docBlockFactory
$docBlocks
private
array<string|int, DocBlock>
$docBlocks
= []
$mutatorPrefixes
private
mixed
$mutatorPrefixes
$phpDocTypeHelper
private
mixed
$phpDocTypeHelper
Methods
__construct()
public
__construct([DocBlockFactoryInterface $docBlockFactory = null ][, array<string|int, string>|null $mutatorPrefixes = null ][, array<string|int, string>|null $accessorPrefixes = null ][, array<string|int, string>|null $arrayMutatorPrefixes = null ]) : mixed
Parameters
- $docBlockFactory : DocBlockFactoryInterface = null
- $mutatorPrefixes : array<string|int, string>|null = null
- $accessorPrefixes : array<string|int, string>|null = null
- $arrayMutatorPrefixes : array<string|int, string>|null = null
Return values
mixed —getLongDescription()
Gets the long description of the property.
public
getLongDescription(mixed $class, mixed $property[, array<string|int, mixed> $context = [] ]) : string|null
Parameters
- $class : mixed
- $property : mixed
- $context : array<string|int, mixed> = []
Return values
string|null —getShortDescription()
Gets the short description of the property.
public
getShortDescription(mixed $class, mixed $property[, array<string|int, mixed> $context = [] ]) : string|null
Parameters
- $class : mixed
- $property : mixed
- $context : array<string|int, mixed> = []
Return values
string|null —getTypes()
Gets types of a property.
public
getTypes(mixed $class, mixed $property[, array<string|int, mixed> $context = [] ]) : array<string|int, Type>|null
Parameters
- $class : mixed
- $property : mixed
- $context : array<string|int, mixed> = []
Return values
array<string|int, Type>|null —createFromReflector()
Prevents a lot of redundant calls to ContextFactory::createForNamespace().
private
createFromReflector(ReflectionClass $reflector) : Context
Parameters
- $reflector : ReflectionClass
Return values
Context —getDocBlock()
private
getDocBlock(string $class, string $property) : array<string|int, mixed>
Parameters
- $class : string
- $property : string
Return values
array<string|int, mixed> —getDocBlockFromMethod()
private
getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type) : array<string|int, mixed>|null
Parameters
- $class : string
- $ucFirstProperty : string
- $type : int
Return values
array<string|int, mixed>|null —getDocBlockFromProperty()
private
getDocBlockFromProperty(string $class, string $property) : DocBlock|null
Parameters
- $class : string
- $property : string