Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (array $config=array()) | |
addModel (Parameter $model) | |
addOperation (OperationInterface $operation) | |
getApiVersion () | |
getBaseUrl () | |
getData ($key) | |
getDescription () | |
getModel ($id) | |
getModels () | |
getName () | |
getOperation ($name) | |
getOperations () | |
hasModel ($id) | |
hasOperation ($name) | |
serialize () | |
setBaseUrl ($baseUrl) | |
setData ($key, $value) | |
toArray () | |
unserialize ($json) | |
Static Public Member Functions | |
static | factory ($config, array $options=array()) |
Protected Member Functions | |
fromArray (array $config) | |
Protected Attributes | |
$apiVersion | |
$baseUrl | |
$description | |
$extraData = array() | |
$models = array() | |
$name | |
$operations = array() | |
Static Protected Attributes | |
static | $descriptionLoader |
A ServiceDescription stores service information based on a service document
Definition at line 11 of file ServiceDescription.php.
Guzzle\Service\Description\ServiceDescription::__construct | ( | array | $config = array() | ) |
array | $config | Array of configuration data |
Definition at line 79 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\fromArray().
Guzzle\Service\Description\ServiceDescription::addModel | ( | Parameter | $model | ) |
Add a model to the service description
Parameter | $model | Model to add |
Definition at line 213 of file ServiceDescription.php.
References Guzzle\Service\Description\Parameter\getName().
Guzzle\Service\Description\ServiceDescription::addOperation | ( | OperationInterface | $operation | ) |
Add a operation to the service description
OperationInterface | $operation | Operation to add |
Definition at line 171 of file ServiceDescription.php.
References Guzzle\Service\Description\OperationInterface\getName(), and Guzzle\Service\Description\OperationInterface\setServiceDescription().
|
static |
{}
string | array | $config | File to build or array of operation information |
array | $options | Service description factory options |
Definition at line 65 of file ServiceDescription.php.
Referenced by Guzzle\Tests\Service\Command\AbstractCommandTest\getClient(), Guzzle\Tests\Service\Command\ServiceDescriptionFactoryTest\getDescription(), Guzzle\Tests\Service\Command\OperationResponseParserTest\getDescription(), Guzzle\Tests\Plugin\ErrorResponse\ErrorResponsePluginTest\setUp(), Guzzle\Tests\Service\ClientTest\setUp(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testAdditionalPropertiesDisabledDiscardsData(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testAdditionalPropertiesWithRefAreResolved(), Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest\testAddsOtherFields(), Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest\testAllowsDeepNestedInheritance(), Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest\testAllowsExtraData(), Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest\testAllowsMultipleInheritance(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testCanAddListenerToParseDomainObjects(), Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest\testCanLoadNestedExtends(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testCreatesCustomResponseClassInterface(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testDoesNotParseXmlWhenNotUsingXmlVisitor(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testEnsuresResponseClassExists(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testEnsuresResponseClassImplementsResponseClassInterface(), Guzzle\Tests\Service\Description\ServiceDescriptionTest\testFactoryDelegatesToConcreteFactories(), Guzzle\Tests\Service\ClientTest\testGetCommandAfterTwoSetDescriptions(), Guzzle\Tests\Service\Description\ServiceDescriptionTest\testModelsHaveNames(), Guzzle\Tests\Service\Command\OperationCommandTest\testParsesResponsesUsingModelParserWhenMatchingModelIsFound(), Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest\testThrowsExceptionWhenExtendingMissingCommand(), Guzzle\Tests\Service\Command\DefaultRequestSerializerTest\testValidatesAdditionalParameters(), Guzzle\Tests\Service\Command\CommandTest\testValidatesAdditionalParameters(), Guzzle\Tests\Service\Command\OperationResponseParserTest\testVisitsAdditionalProperties(), and Guzzle\Tests\Service\Command\LocationVisitor\Request\PostFileVisitorTest\testVisitsLocationWithMultipleFiles().
|
protected |
Initialize the state from an array
array | $config | Configuration data |
InvalidArgumentException |
Definition at line 253 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$name.
Referenced by Guzzle\Service\Description\ServiceDescription\__construct(), and Guzzle\Service\Description\ServiceDescription\unserialize().
Guzzle\Service\Description\ServiceDescription::getApiVersion | ( | ) |
Get the API version of the service
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 220 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$apiVersion.
Guzzle\Service\Description\ServiceDescription::getBaseUrl | ( | ) |
Get the basePath/baseUrl of the description
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 117 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$baseUrl.
Guzzle\Service\Description\ServiceDescription::getData | ( | $key | ) |
Get arbitrary data from the service description that is not part of the Guzzle spec
string | $key | Data key to retrieve |
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 235 of file ServiceDescription.php.
Guzzle\Service\Description\ServiceDescription::getDescription | ( | ) |
Get a summary of the purpose of the API
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 230 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$description.
Guzzle\Service\Description\ServiceDescription::getModel | ( | $id | ) |
Get a specific model from the description
string | $id | ID of the model |
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 178 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\getModels().
Guzzle\Service\Description\ServiceDescription::getModels | ( | ) |
Get all service description models
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 191 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$models, and Guzzle\Service\Description\ServiceDescription\getModel().
Guzzle\Service\Description\ServiceDescription::getName | ( | ) |
Get the name of the API
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 225 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$name.
Guzzle\Service\Description\ServiceDescription::getOperation | ( | $name | ) |
Get an API operation by name
string | $name | Name of the command |
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 150 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$name.
Referenced by Guzzle\Service\Description\ServiceDescription\getOperations().
Guzzle\Service\Description\ServiceDescription::getOperations | ( | ) |
Get the API operations of the service
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 136 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$name, Guzzle\Service\Description\ServiceDescription\$operations, and Guzzle\Service\Description\ServiceDescription\getOperation().
Referenced by Guzzle\Service\Description\ServiceDescription\toArray().
Guzzle\Service\Description\ServiceDescription::hasModel | ( | $id | ) |
Check if the description has a specific model by name
string | $id | ID of the model |
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 201 of file ServiceDescription.php.
Guzzle\Service\Description\ServiceDescription::hasOperation | ( | $name | ) |
Check if the service has an operation by name
string | $name | Name of the operation to check |
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 145 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$name.
Guzzle\Service\Description\ServiceDescription::serialize | ( | ) |
Definition at line 84 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\toArray().
Guzzle\Service\Description\ServiceDescription::setBaseUrl | ( | $baseUrl | ) |
Set the baseUrl of the description
string | $baseUrl | Base URL of each operation |
Definition at line 129 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$baseUrl.
Guzzle\Service\Description\ServiceDescription::setData | ( | $key, | |
$value | |||
) |
Set arbitrary data on the service description
string | $key | Data key to set |
mixed | $value | Value to set |
Implements Guzzle\Service\Description\ServiceDescriptionInterface.
Definition at line 240 of file ServiceDescription.php.
Guzzle\Service\Description\ServiceDescription::toArray | ( | ) |
Get the array representation of an object
Implements Guzzle\Common\ToArrayInterface.
Definition at line 95 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\$extraData, Guzzle\Service\Description\ServiceDescription\$name, Guzzle\Service\Description\ServiceDescription\getOperations(), and Guzzle\Service\Description\Parameter\toArray().
Referenced by Guzzle\Service\Description\ServiceDescription\serialize().
Guzzle\Service\Description\ServiceDescription::unserialize | ( | $json | ) |
Definition at line 89 of file ServiceDescription.php.
References Guzzle\Service\Description\ServiceDescription\fromArray().
|
protected |
API version
Definition at line 35 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\getApiVersion().
|
protected |
Definition at line 56 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\getBaseUrl(), and Guzzle\Service\Description\ServiceDescription\setBaseUrl().
|
protected |
Summary of the API
Definition at line 41 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\getDescription().
|
staticprotected |
Factory used in factory method
Definition at line 51 of file ServiceDescription.php.
|
protected |
Any extra API data
Definition at line 47 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\toArray().
|
protected |
Array of API models
Definition at line 23 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\getModels().
|
protected |
Name of the API
Definition at line 29 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\fromArray(), Guzzle\Service\Description\ServiceDescription\getName(), Guzzle\Service\Description\ServiceDescription\getOperation(), Guzzle\Service\Description\ServiceDescription\getOperations(), Guzzle\Service\Description\ServiceDescription\hasOperation(), and Guzzle\Service\Description\ServiceDescription\toArray().
|
protected |
Array of {
Definition at line 17 of file ServiceDescription.php.
Referenced by Guzzle\Service\Description\ServiceDescription\getOperations().