# Class CatalogService

This class defines a cloud service; a relationship between a specific OpenStack and a provided service, represented by a URL in the service catalog.

Because Service is an abstract class, it cannot be called directly. Provider services such as Rackspace Cloud Servers or OpenStack Swift are each subclassed from Service.

  OpenCloud\Common\Base
  OpenCloud\Common\Service\AbstractService implements OpenCloud\Common\Service\ServiceInterface
  OpenCloud\Common\Service\CatalogService

#### Direct known subclasses

OpenCloud\Autoscale\Service, OpenCloud\CloudMonitoring\Service, OpenCloud\Common\Service\NovaService, OpenCloud\DNS\Service, OpenCloud\Image\Service, OpenCloud\ObjectStore\AbstractService, OpenCloud\Orchestration\Service, OpenCloud\Queues\Service

#### Indirect known subclasses

OpenCloud\Compute\Service, OpenCloud\Database\Service, OpenCloud\LoadBalancer\Service, OpenCloud\ObjectStore\CDNService, OpenCloud\ObjectStore\Service, OpenCloud\Volume\Service
Abstract
Namespace: OpenCloud\Common\Service
Located at OpenCloud/Common/Service/CatalogService.php

Methods summary
`public` | # `__construct( Guzzle\Http\ClientInterface $client, string $type = null, string $name = null, string $region = null, string $urlType = null )` Creates a service object, based off the specified client. Creates a service object, based off the specified client. The service's URL is defined in the client's serviceCatalog; it uses the $type, $name, $region, and $urlType to find the proper endpoint and set it. If it cannot find a URL in the service catalog that matches the criteria, then an exception is thrown. #### Parameters $client `Client` $client Client object $type `string` $type Service type (e.g. 'compute') $name `string` $name Service name (e.g. 'cloudServersOpenStack') $region `string` $region Service region (e.g. 'DFW', 'ORD', 'IAD', 'LON', 'SYD' or 'HKG') $urlType `string` $urlType Either 'publicURL' or 'privateURL'
`public string` | # `getType( )` #### Returns `string`
`public string` | # `getRegion( )` #### Returns `string`
`public string` | # `getName( )` #### Returns `string`
`public string` | # `getUrlType( )` #### Returns `string`
`public Guzzle\Http\Url` | # `getUrl( string $path = null, array $query = array() )` Returns the URL for the Service Returns the URL for the Service #### Parameters $path `string` $path URL path segment $query `array` $query Array of query pairs #### Returns `Guzzle\Http\Url`
`public array` | # `getExtensions( )` Returns the /extensions for the service Returns the /extensions for the service #### Returns `array` of objects #### Api
`public array` | # `limits( )` Returns the limits for the service Returns the limits for the service #### Returns `array` of limits
`public Guzzle\Http\Url` | # `getBaseUrl( )` Get the base URL for this service, based on the set URL type. Get the base URL for this service, based on the set URL type. #### Returns `Guzzle\Http\Url` #### Throws ``OpenCloud\Common\Exceptions\ServiceException``

Methods inherited from OpenCloud\Common\Service\AbstractService
`collection(), getClient(), getCurrentNamespace(), getEndpoint(), getNamespaces(), getResources(), resolveResourceClass(), resource(), resourceList(), setClient(), setEndpoint()`

Methods inherited from OpenCloud\Common\Base
`__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()`

Constants summary
`string` | `DEFAULT_URL_TYPE` | `'publicURL'` | #

Properties summary
`protected boolean` | $regionless | `false` | # Indicates whether a service is "regionless" or not. Defaults to FALSE because nearly all services are region-specific. Indicates whether a service is "regionless" or not. Defaults to FALSE because nearly all services are region-specific.

Properties inherited from OpenCloud\Common\Service\AbstractService
`$client, $endpoint, $namespaces, $resources`

Properties inherited from OpenCloud\Common\Base
`$aliases`