PHP Класс Scalr\Tests\Functional\Api\V2\SpecSchema\SpecManager

С версии: 5.6.14 (03.12.2015)
Автор: Andrii Penchuk ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $version, string $service ) SpecManager constructor.
getDefinitions ( string $filter = null ) : array Get Object definition
getPathParameters ( string $path ) : array Return endpoint parameters
getPathTemplates ( string $method = null ) : string[] The list of endpoints in Api specifications
getResponse ( string $path, string $method, integer $httpCode ) : DetailsResponse | ListResponse Get Response definitions with Api endpoint

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

Метод Описание
checkPath ( string $path ) Check if path not exist, will throw exception
getPath ( variadic $segments ) : array Return Api definitions from segment
resolveReferences ( array $schema, mixed $specObject = null, mixed $objectName = null ) : DetailsResponse | ListResponse Resolve schema references to object

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

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

SpecManager constructor.
public __construct ( string $version, string $service )
$version string Api version
$service string spec file service

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

Check if path not exist, will throw exception
protected checkPath ( string $path )
$path string path in Api specifications

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

Get Object definition
public getDefinitions ( string $filter = null ) : array
$filter string optional The pattern to filter for object definition in specification if the name of the object matched the filter this object will not be included in return result
Результат array

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

Return Api definitions from segment
protected getPath ( variadic $segments ) : array
$segments variadic patch segments
Результат array

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

Return endpoint parameters
public getPathParameters ( string $path ) : array
$path string Api endpoint
Результат array

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

The list of endpoints in Api specifications
public getPathTemplates ( string $method = null ) : string[]
$method string HTTP method
Результат string[]

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

Get Response definitions with Api endpoint
public getResponse ( string $path, string $method, integer $httpCode ) : DetailsResponse | ListResponse
$path string Api endpoint
$method string HTTP method
$httpCode integer HTTP code
Результат Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\DetailsResponse | Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\ListResponse

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

Resolve schema references to object
protected resolveReferences ( array $schema, mixed $specObject = null, mixed $objectName = null ) : DetailsResponse | ListResponse
$schema array segment Api specifications
$specObject mixed optional object schema view
$objectName mixed optional object property name
Результат Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\DetailsResponse | Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\ListResponse