PHP 클래스 Scalr\Tests\Functional\Api\V2\SpecSchema\SpecManager

부터: 5.6.14 (03.12.2015)
저자: Andrii Penchuk ([email protected])
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 메소드들

메소드 설명
__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