Class DocModel
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).
Methods Summary
- __construct ( array $docs )
-
toArray ( )
Convert the doc model to an array.
-
getServiceDocs ( )
Retrieves documentation about the service.
-
getOperationDocs ( string $operation )
Retrieves documentation about an operation.
-
getErrorDocs ( string $error )
Retrieves documentation about an error.
-
getShapeDocs ( string $shapeName, string $parentName, string $ref )
Retrieves documentation about a shape, specific to the context.
Methods Details
__construct ( array $docs )
Parameters
array | $docs |
Exceptions
RuntimeException |
array toArray ( )
Convert the doc model to an array.
Returns
array |
null|string getServiceDocs ( )
Retrieves documentation about the service.
Returns
null|string |
null|string getOperationDocs ( string $operation )
Retrieves documentation about an operation.
Parameters
string | $operation | Name of the operation |
Returns
null|string |
null|string getErrorDocs ( string $error )
Retrieves documentation about an error.
Parameters
string | $error | Name of the error |
Returns
null|string |
null|string getShapeDocs ( string $shapeName, string $parentName, string $ref )
Retrieves documentation about a shape, specific to the context.
Parameters
string | $shapeName | Name of the shape. |
string | $parentName | Name of the parent/context shape. |
string | $ref | Name used by the context to reference the shape. |
Returns
null|string |