PHP Класс Swagger\Annotations\AbstractAnnotation

Наследование: implements JsonSerializabl\JsonSerializable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_blacklist array List of properties are blacklisted from the JSON output.
$_context Swagger\Context
$_nested array Examples: 'Swagger\Annotation\Info' => 'info', // Set @SWG\Info annotation as the info property. 'Swagger\Annotation\Parameter' => ['parameters'], // Append @SWG\Parameter annotations the parameters array. 'Swagger\Annotation\Path' => ['paths', 'path'], // Append @SWG\Path annotations the paths array and use path as key.
$_parents string[] Reverse mapping of $_nested with the allowed parent annotations.
$_required array The properties which are required by the spec
$_types array Examples: 'name' => 'string' // a string 'required' => 'boolean', // true or false 'tags' => '[string]', // array containing strings 'in' => ["query", "header", "path", "formData", "body"] // must be one on these
$_unmerged array Annotations that couldn't be merged by mapping or postprocessing.
$x array The keys inside the array will be prefixed with x-. For further details see https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#vendorExtensions.

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

Метод Описание
__construct ( array $properties )
__debugInfo ( )
__get ( $property )
__set ( $property, $value )
__toString ( )
identity ( ) : string Return a identity for easy debugging.
jsonSerialize ( ) : array Customize the way json_encode() renders the annotations.
merge ( AbstractAnnotation[] $annotations, boolean $ignore = false ) : AbstractAnnotation[] Merge given annotations to their mapped properties configured in static::$_nested.
mergeProperties ( object $object ) Merge the properties from the given object into this annotation.
validate ( array $parents = [], array $skip = [] ) : boolean Validate annotation tree, and log notices & warnings.

Защищенные методы

Метод Описание
_identity ( array $properties ) : string Helper for generating the identity()

Приватные методы

Метод Описание
_validate ( array | object $fields, array $path, $skip ) : boolean Recursively validate all annotation properties.
nested ( AbstractAnnotation $annotation, Context $nestedContext ) : AbstractAnnotation Wrap the context with a reference to the annotation it is nested in.
validateType ( $type, $value )

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

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

public __construct ( array $properties )
$properties array

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

public __debugInfo ( )

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

public __get ( $property )

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

public __set ( $property, $value )

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

public __toString ( )

_identity() защищенный Метод

Helper for generating the identity()
protected _identity ( array $properties ) : string
$properties array
Результат string

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

Example: "@SWG\Get(path="/pets")"
public identity ( ) : string
Результат string

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

Customize the way json_encode() renders the annotations.
public jsonSerialize ( ) : array
Результат array

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

Annotations that couldn't be merged are added to the _unmerged array.
public merge ( AbstractAnnotation[] $annotations, boolean $ignore = false ) : AbstractAnnotation[]
$annotations AbstractAnnotation[]
$ignore boolean Ignore unmerged annotations
Результат AbstractAnnotation[] The unmerged annotations

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

Prevents overwriting properties that are already configured.
public mergeProperties ( object $object )
$object object

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

Validate annotation tree, and log notices & warnings.
public validate ( array $parents = [], array $skip = [] ) : boolean
$parents array The path of annotations above this annotation in the tree.
$skip array (prevent stack overflow, when traversing an infinite dependency graph)
Результат boolean

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

$_blacklist публичное статическое свойство

List of properties are blacklisted from the JSON output.
public static array $_blacklist
Результат array

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

public Context,Swagger $_context
Результат Swagger\Context

$_nested публичное статическое свойство

Examples: 'Swagger\Annotation\Info' => 'info', // Set @SWG\Info annotation as the info property. 'Swagger\Annotation\Parameter' => ['parameters'], // Append @SWG\Parameter annotations the parameters array. 'Swagger\Annotation\Path' => ['paths', 'path'], // Append @SWG\Path annotations the paths array and use path as key.
public static array $_nested
Результат array

$_parents публичное статическое свойство

Reverse mapping of $_nested with the allowed parent annotations.
public static string[] $_parents
Результат string[]

$_required публичное статическое свойство

The properties which are required by the spec
public static array $_required
Результат array

$_types публичное статическое свойство

Examples: 'name' => 'string' // a string 'required' => 'boolean', // true or false 'tags' => '[string]', // array containing strings 'in' => ["query", "header", "path", "formData", "body"] // must be one on these
public static array $_types
Результат array

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

Annotations that couldn't be merged by mapping or postprocessing.
public array $_unmerged
Результат array

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

The keys inside the array will be prefixed with x-. For further details see https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#vendorExtensions.
public array $x
Результат array