PHP Класс Swagger\Analysis

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$annotations SplObjectStorage
$classes array Class definitions
$swagger Swagger\Annotations\Swagger The target Swagger annotation.

Открытые методы

Метод Описание
__construct ( array $annotations = [], null $context = null )
addAnalysis ( Analysis $analysis )
addAnnotation ( AbstractAnnotation $annotation, Context $context )
addAnnotations ( array $annotations, Context $context )
addClassDefinition ( array $definition )
getAnnotationsOfType ( string $class, boolean $strict = false ) : array
getContext ( object $annotation ) : Context
getSubClasses ( $class )
getSuperClasses ( $class )
merged ( ) : Analysis Build an analysis with only the annotations that are merged into the swagger annotation.
process ( Closur\Closure | Closur\Closure[] $processors = null ) Apply the processor(s)
processors ( ) : array Get direct access to the processors array.
registerProcessor ( Closure $processor ) Register a processor
split ( ) : object Split the annotation into two analysis.
unmerged ( ) : Analysis Analysis with only the annotations that not merged.
unregisterProcessor ( Closure $processor ) Unregister a processor
validate ( )

Описание методов

__construct() публичный Метод

public __construct ( array $annotations = [], null $context = null )
$annotations array
$context null

addAnalysis() публичный Метод

public addAnalysis ( Analysis $analysis )
$analysis Analysis

addAnnotation() публичный Метод

public addAnnotation ( AbstractAnnotation $annotation, Context $context )
$annotation Swagger\Annotations\AbstractAnnotation
$context Context

addAnnotations() публичный Метод

public addAnnotations ( array $annotations, Context $context )
$annotations array
$context Context

addClassDefinition() публичный Метод

public addClassDefinition ( array $definition )
$definition array

getAnnotationsOfType() публичный Метод

public getAnnotationsOfType ( string $class, boolean $strict = false ) : array
$class string
$strict boolean Innon-strict mode childclasses are also detected.
Результат array

getContext() публичный Метод

public getContext ( object $annotation ) : Context
$annotation object
Результат Context

getSubClasses() публичный Метод

public getSubClasses ( $class )

getSuperClasses() публичный Метод

public getSuperClasses ( $class )

merged() публичный Метод

Build an analysis with only the annotations that are merged into the swagger annotation.
public merged ( ) : Analysis
Результат Analysis

process() публичный Метод

Apply the processor(s)
public process ( Closur\Closure | Closur\Closure[] $processors = null )
$processors Closur\Closure | Closur\Closure[] One or more processors

processors() публичный статический Метод

Get direct access to the processors array.
public static processors ( ) : array
Результат array reference

registerProcessor() публичный статический Метод

Register a processor
public static registerProcessor ( Closure $processor )
$processor Closure

split() публичный Метод

One with annotations that are merged and one with annotations that are not merged.
public split ( ) : object
Результат object {merged: Analysis, unmerged: Analysis}

unmerged() публичный Метод

Analysis with only the annotations that not merged.
public unmerged ( ) : Analysis
Результат Analysis

unregisterProcessor() публичный статический Метод

Unregister a processor
public static unregisterProcessor ( Closure $processor )
$processor Closure

validate() публичный Метод

public validate ( )

Описание свойств

$annotations публичное свойство

public SplObjectStorage $annotations
Результат SplObjectStorage

$classes публичное свойство

Class definitions
public array $classes
Результат array

$swagger публичное свойство

The target Swagger annotation.
public Swagger,Swagger\Annotations $swagger
Результат Swagger\Annotations\Swagger