DocModel
in package
Encapsulates the documentation strings for a given service-version and provides methods for extracting the desired parts related to a service, operation, error, or shape (i.e., parameter).
Table of Contents
Methods
- __construct() : mixed
- getErrorDocs() : null|string
- Retrieves documentation about an error.
- getOperationDocs() : null|string
- Retrieves documentation about an operation.
- getServiceDocs() : null|string
- Retrieves documentation about the service.
- getShapeDocs() : null|string
- Retrieves documentation about a shape, specific to the context.
- toArray() : array<string|int, mixed>
- Convert the doc model to an array.
Methods
__construct()
public
__construct(array<string|int, mixed> $docs) : mixed
Parameters
- $docs : array<string|int, mixed>
Tags
getErrorDocs()
Retrieves documentation about an error.
public
getErrorDocs(string $error) : null|string
Parameters
- $error : string
-
Name of the error
Return values
null|stringgetOperationDocs()
Retrieves documentation about an operation.
public
getOperationDocs(string $operation) : null|string
Parameters
- $operation : string
-
Name of the operation
Return values
null|stringgetServiceDocs()
Retrieves documentation about the service.
public
getServiceDocs() : null|string
Return values
null|stringgetShapeDocs()
Retrieves documentation about a shape, specific to the context.
public
getShapeDocs(string $shapeName, string $parentName, string $ref) : null|string
Parameters
- $shapeName : string
-
Name of the shape.
- $parentName : string
-
Name of the parent/context shape.
- $ref : string
-
Name used by the context to reference the shape.
Return values
null|stringtoArray()
Convert the doc model to an array.
public
toArray() : array<string|int, mixed>