Analyser
in package
Extract swagger-php annotations from a [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) using Doctrine's DocParser.
Table of Contents
- $context : null|Context
- Allows Annotation classes to know the context of the annotation that is being processed.
- $defaultImports : mixed
- Use @OA\* for OpenAPI annotations (unless overwritten by a use statement).
- $docParser : DocParser
- $whitelist : array<string|int, mixed>|false
- List of namespaces that should be detected by the doctrine annotation parser.
- __construct() : mixed
- fromComment() : array<string|int, mixed>
- Use doctrine to parse the comment block and return the detected annotations.
Properties
$context
Allows Annotation classes to know the context of the annotation that is being processed.
public
static null|Context
$context
$defaultImports
Use @OA\* for OpenAPI annotations (unless overwritten by a use statement).
public
static mixed
$defaultImports
= ['oa' => 'OpenApi\\Annotations']
Tags
$docParser
public
DocParser
$docParser
$whitelist
List of namespaces that should be detected by the doctrine annotation parser.
public
static array<string|int, mixed>|false
$whitelist
= ['OpenApi\\Annotations\\']
Set to false to load all detected classes.
Tags
Methods
__construct()
public
__construct([DocParser|null $docParser = null ]) : mixed
Parameters
- $docParser : DocParser|null = null
Return values
mixed —fromComment()
Use doctrine to parse the comment block and return the detected annotations.
public
fromComment(string $comment, Context $context) : array<string|int, mixed>
Parameters
- $comment : string
-
a T_DOC_COMMENT
- $context : Context
Return values
array<string|int, mixed> —Annotations