Copied!

Extracts data using a PHPDoc parser.

CloneableInstantiable
Constants
public Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::ACCESSOR = 1
public Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::MUTATOR = 2
public Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::PROPERTY = 0
Methods
public __construct(?phpDocumentor\Reflection\DocBlockFactoryInterface $docBlockFactory = NULL, ?array $mutatorPrefixes = NULL, ?array $accessorPrefixes = NULL, ?array $arrayMutatorPrefixes = NULL)
 
  • param string[]|null $mutatorPrefixes
  • param string[]|null $accessorPrefixes
  • param string[]|null $arrayMutatorPrefixes
public getDocBlock(string $class, string $property) : ?phpDocumentor\Reflection\DocBlock
public getLongDescription(string $class, string $property, array $context = []) : ?string
public getShortDescription(string $class, string $property, array $context = []) : ?string
public getType(string $class, string $property, array $context = []) : ?Symfony\Component\TypeInfo\Type
 
  • experimental
public getTypeFromConstructor(string $class, string $property) : ?Symfony\Component\TypeInfo\Type
 
  • experimental
public getTypes(string $class, string $property, array $context = []) : ?array
public getTypesFromConstructor(string $class, string $property) : ?array
Properties
private array $accessorPrefixes
private array $arrayMutatorPrefixes
private phpDocumentor\Reflection\Types\ContextFactory $contextFactory
private array $contexts = []
 
  • var \Context[]
private phpDocumentor\Reflection\DocBlockFactoryInterface $docBlockFactory
private array $docBlocks = []
 
  • var array<string,array{: \DocBlock|null, : int|null, : string|null}>
private array $mutatorPrefixes
private Symfony\Component\PropertyInfo\Util\PhpDocTypeHelper $phpDocTypeHelper
private Symfony\Component\TypeInfo\TypeContext\TypeContextFactory $typeContextFactory
Methods
private createFromReflector(ReflectionClass $reflector) : phpDocumentor\Reflection\Types\Context
 

Prevents a lot of redundant calls to ContextFactory::createForNamespace().

private filterDocBlockParams(phpDocumentor\Reflection\DocBlock $docBlock, string $allowedParam) : phpDocumentor\Reflection\DocBlock
private findDocBlock(string $class, string $property) : array
 
  • return array{: \DocBlock|null, : int|null, : string|null}
private getDocBlockFromConstructor(string $class, string $property) : ?phpDocumentor\Reflection\DocBlock
private getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type) : ?array
 
  • return array{: \DocBlock, : string}|null
private getDocBlockFromProperty(string $class, string $property) : ?phpDocumentor\Reflection\DocBlock
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration