Class Guzzle\Service\Description\ServiceDescription

ImplementsGuzzle\Common\ToArrayInterface, Guzzle\Service\Description\ServiceDescriptionInterface

A ServiceDescription stores service information based on a service document

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
fromArray() Initialize the state from an array Guzzle\Service\Description\ServiceDescription

Property Details

$apiVersion protected property

API version

protected string $apiVersion null
$baseUrl protected property


protected string $baseUrl null
$description protected property

Summary of the API

protected string $description null
$descriptionLoader protected static property

Factory used in factory method

$extraData protected property

Any extra API data

protected array $extraData = []
$models protected property

Array of API models

protected array $models = []
$name protected property

Name of the API

protected string $name null
$operations protected property

Array of {@see OperationInterface} objects

protected array $operations = []

Method Details

__construct() public method

public void __construct ( array $config = [] )
$config array

Array of configuration data

addModel() public method

Add a model to the service description

public self addModel ( Guzzle\Service\Description\Parameter $model )
$model Guzzle\Service\Description\Parameter

Model to add

addOperation() public method

Add a operation to the service description

public self addOperation ( Guzzle\Service\Description\OperationInterface $operation )
$operation Guzzle\Service\Description\OperationInterface

Operation to add

factory() public static method


public static self factory ( $config, array $options = [] )
$config string|array

File to build or array of operation information

$options array

Service description factory options

fromArray() protected method

Initialize the state from an array

protected void fromArray ( array $config )
$config array

Configuration data

throws Guzzle\Common\Exception\InvalidArgumentException
getApiVersion() public method

public void getApiVersion ( )
getBaseUrl() public method

public void getBaseUrl ( )
getData() public method

public void getData ( $key )
getDescription() public method

public void getDescription ( )
getModel() public method

public void getModel ( $id )
getModels() public method

public void getModels ( )
getName() public method

public void getName ( )
getOperation() public method

public void getOperation ( $name )
getOperations() public method

public void getOperations ( )
hasModel() public method

public void hasModel ( $id )
hasOperation() public method

public void hasOperation ( $name )
serialize() public method

public void serialize ( )
setBaseUrl() public method

Set the baseUrl of the description

public self setBaseUrl ( $baseUrl )
$baseUrl string

Base URL of each operation

setData() public method

public void setData ( $key, $value )
toArray() public method

public void toArray ( )
unserialize() public method

public void unserialize ( $json )