PHP 클래스 Swagger\Annotations\AbstractAnnotation

상속: implements JsonSerializabl\JsonSerializable
파일 보기 프로젝트 열기: zircote/swagger-php 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_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