PHP Class Swagger\Analysis

Afficher le fichier Open project: zircote/swagger-php Class Usage Examples

Méthodes publiques

Свойство Type Description
$annotations SplObjectStorage
$classes array Class definitions
$swagger Swagger\Annotations\Swagger The target Swagger annotation.

Méthodes publiques

Méthode Description
__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 ( )

Method Details

__construct() public méthode

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

addAnalysis() public méthode

public addAnalysis ( Analysis $analysis )
$analysis Analysis

addAnnotation() public méthode

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

addAnnotations() public méthode

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

addClassDefinition() public méthode

public addClassDefinition ( array $definition )
$definition array

getAnnotationsOfType() public méthode

public getAnnotationsOfType ( string $class, boolean $strict = false ) : array
$class string
$strict boolean Innon-strict mode childclasses are also detected.
Résultat array

getContext() public méthode

public getContext ( object $annotation ) : Context
$annotation object
Résultat Context

getSubClasses() public méthode

public getSubClasses ( $class )

getSuperClasses() public méthode

public getSuperClasses ( $class )

merged() public méthode

Build an analysis with only the annotations that are merged into the swagger annotation.
public merged ( ) : Analysis
Résultat Analysis

process() public méthode

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

processors() public static méthode

Get direct access to the processors array.
public static processors ( ) : array
Résultat array reference

registerProcessor() public static méthode

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

split() public méthode

One with annotations that are merged and one with annotations that are not merged.
public split ( ) : object
Résultat object {merged: Analysis, unmerged: Analysis}

unmerged() public méthode

Analysis with only the annotations that not merged.
public unmerged ( ) : Analysis
Résultat Analysis

unregisterProcessor() public static méthode

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

validate() public méthode

public validate ( )

Property Details

$annotations public_oe property

public SplObjectStorage $annotations
Résultat SplObjectStorage

$classes public_oe property

Class definitions
public array $classes
Résultat array

$swagger public_oe property

The target Swagger annotation.
public Swagger,Swagger\Annotations $swagger
Résultat Swagger\Annotations\Swagger