Метод | Описание | |
---|---|---|
__construct ( string $title ) | Create a new API Definition | |
addBaseUriParameter ( raml\NamedParameter $namedParameter ) | Add a new base uri parameter | |
addDocumentation ( string $title, string $documentation ) | Add a piece of documentation to the documentation list | |
addProtocol ( string $protocol ) | Add a supported protocol | |
addResource ( raml\Resource $resource ) | Add an additional resource | |
addSchemaCollection ( string $collectionName, array $schemas ) | Add an schema | |
addSecuredBy ( raml\SecurityScheme $securityScheme ) | Add an additional security scheme to the list of schemes the whole API is secured by | |
addSecurityScheme ( raml\SecurityScheme $securityScheme ) | Add an additional security scheme | |
createFromArray ( string $title, array $data = [] ) : |
Create a new API Definition from an array | |
getBaseUriParameters ( ) : raml\NamedParameter[] | Get the base uri parameters | |
getBaseUrl ( ) : string | Get the base URI | |
getDefaultMediaType ( ) : string | Get the default media type | |
getDocumentationList ( ) : array | Get the documentation of the API | |
getProtocols ( ) : array | Get the list of support protocols | |
getResourceByPath ( string $path ) : Raml\Resource | Get a resource by a path | |
getResourceByUri ( string $uri ) : Raml\Resource | Get a resource by a uri | |
getResources ( ) : Raml\Resource[] | Get the resources tree | |
getResourcesAsUri ( Raml\RouteFormatter\RouteFormatterInterface $formatter = null ) : Raml\RouteFormatter\RouteFormatterInterface | Returns all the resources as a URI, essentially documenting the entire API Definition. | |
getSchemaCollections ( ) : array[] | Get the schemas defined in the root of the API | |
getSecuredBy ( ) : raml\SecurityScheme | Get a list of security schemes that the whole API is secured by | |
getSecurityScheme ( $schemeName ) : raml\SecurityScheme | Get a security scheme by it's name | |
getTitle ( ) : string | Get the title of the API | |
getVersion ( ) : string | Get the version string of the API | |
setBaseUrl ( string $baseUrl ) | Set the base url | |
setDefaultMediaType ( $defaultMediaType ) | Set a default media type | |
setVersion ( $version ) | Set the version | |
supportsHttp ( ) : boolean | Does the API support HTTP (non SSL) requests? | |
supportsHttps ( ) : boolean | Does the API support HTTPS (SSL enabled) requests? |
Метод | Описание | |
---|---|---|
addSchema ( string $collectionName, string $schemaName, string | Raml\Schema\SchemaDefinitionInterface $schema ) | Add a new schema to a collection | |
getMethodsAsArray ( array $resources ) : array[BasicRoute] | Recursive function that generates a flat array of the entire API Definition | |
getResourcesAsArray ( $resources ) : raml\Resource[] |
public __construct ( string $title ) | ||
$title | string |
public addBaseUriParameter ( raml\NamedParameter $namedParameter ) | ||
$namedParameter | raml\NamedParameter |
public addDocumentation ( string $title, string $documentation ) | ||
$title | string | |
$documentation | string |
public addProtocol ( string $protocol ) | ||
$protocol | string |
public addResource ( raml\Resource $resource ) | ||
$resource | raml\Resource |
public addSchemaCollection ( string $collectionName, array $schemas ) | ||
$collectionName | string | |
$schemas | array |
public addSecuredBy ( raml\SecurityScheme $securityScheme ) | ||
$securityScheme | raml\SecurityScheme |
public addSecurityScheme ( raml\SecurityScheme $securityScheme ) | ||
$securityScheme | raml\SecurityScheme |
public static createFromArray ( string $title, array $data = [] ) : |
||
$title | string | |
$data | array | [ title: string version: ?string baseUrl: ?string baseUriParameters: ?array protocols: ?array defaultMediaType: ?string schemas: ?array securitySchemes: ?array documentation: ?array /* ] |
Результат |
public getBaseUriParameters ( ) : raml\NamedParameter[] | ||
Результат | raml\NamedParameter[] |
public getDefaultMediaType ( ) : string | ||
Результат | string |
public getDocumentationList ( ) : array | ||
Результат | array |
public getProtocols ( ) : array | ||
Результат | array |
public getResourceByPath ( string $path ) : Raml\Resource | ||
$path | string | |
Результат | Raml\Resource |
public getResourceByUri ( string $uri ) : Raml\Resource | ||
$uri | string | |
Результат | Raml\Resource |
public getResources ( ) : Raml\Resource[] | ||
Результат | Raml\Resource[] |
public getResourcesAsUri ( Raml\RouteFormatter\RouteFormatterInterface $formatter = null ) : Raml\RouteFormatter\RouteFormatterInterface | ||
$formatter | Raml\RouteFormatter\RouteFormatterInterface | |
Результат | Raml\RouteFormatter\RouteFormatterInterface |
public getSchemaCollections ( ) : array[] | ||
Результат | array[] |
public getSecuredBy ( ) : raml\SecurityScheme | ||
Результат | raml\SecurityScheme |
public getSecurityScheme ( $schemeName ) : raml\SecurityScheme | ||
$schemeName | ||
Результат | raml\SecurityScheme |
public getVersion ( ) : string | ||
Результат | string |
public setDefaultMediaType ( $defaultMediaType ) | ||
$defaultMediaType |
public supportsHttp ( ) : boolean | ||
Результат | boolean |
public supportsHttps ( ) : boolean | ||
Результат | boolean |