PHP Класс Swagger\Context

The context in which the annotation is parsed. It includes useful metadata which the Processors can use to augment the annotations. Context hierarchy: - parseContext |- docBlockContext |- classContext |- docBlockContext |- propertyContext |- methodContext
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( array $properties = [], Context $parent = null )
__debugInfo ( )
__get ( string $property ) : mixed Traverse the context tree to get the property value.
__toString ( )
detect ( integer $index ) : Context Create a Context based on the debug_backtrace
fullyQualifiedName ( string $class ) : string Resolve the fully qualified name.
getDebugLocation ( ) : string Export location for debugging.
getRootContext ( ) : Context
is ( string $type ) : boolean Check if a property is set directly on this context and not its parent context.
not ( string $type ) : boolean Check if a property is NOT set directly on this context and but its parent context.
phpdocContent ( ) : string | null The text contents of the phpdoc comment (excl. tags)
phpdocDescription ( ) : string | null An optional longer piece of text providing more details on the associated element’s function. This is very useful when working with a complex element.
phpdocSummary ( ) : string | null A short piece of text, usually one line, providing the basic function of the associated element.
with ( string $property ) : boolean | Context Return the context containing the specified property.

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

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

public __construct ( array $properties = [], Context $parent = null )
$properties array new properties for this context.
$parent Context The parent context

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

public __debugInfo ( )

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

Traverse the context tree to get the property value.
public __get ( string $property ) : mixed
$property string
Результат mixed

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

public __toString ( )

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

Create a Context based on the debug_backtrace
public static detect ( integer $index ) : Context
$index integer
Результат Context

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

Resolve the fully qualified name.
public fullyQualifiedName ( string $class ) : string
$class string The class name
Результат string

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

Export location for debugging.
public getDebugLocation ( ) : string
Результат string Example: "file1.php on line 12"

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

public getRootContext ( ) : Context
Результат Context

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

Check if a property is set directly on this context and not its parent context.
public is ( string $type ) : boolean
$type string Example: $c->is('method') or $c->is('class')
Результат boolean

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

Check if a property is NOT set directly on this context and but its parent context.
public not ( string $type ) : boolean
$type string Example: $c->not('method') or $c->not('class')
Результат boolean

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

The text contents of the phpdoc comment (excl. tags)
public phpdocContent ( ) : string | null
Результат string | null

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

An optional longer piece of text providing more details on the associated element’s function. This is very useful when working with a complex element.
public phpdocDescription ( ) : string | null
Результат string | null

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

A short piece of text, usually one line, providing the basic function of the associated element.
public phpdocSummary ( ) : string | null
Результат string | null

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

Return the context containing the specified property.
public with ( string $property ) : boolean | Context
$property string
Результат boolean | Context