blue-twilight/app/Services/Rackspace/Rackspace.php

32 lines
956 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Services\Rackspace;
use App\Services\Rackspace\ObjectStoreCdn\v1\Service as ObjectStoreCdnService;
use OpenStack\Common\Service\Builder;
use OpenStack\OpenStack;
class Rackspace extends OpenStack
{
/** @var Builder */
private $rsBuilder;
public function __construct(array $options = [], Builder $builder = null)
{
parent::__construct($options, $builder);
$this->rsBuilder = $builder ?: new Builder($options, 'App\Services\Rackspace');
}
/**
* Creates a new Object Store (Rackspace CDN) v1 service.
*
* @param array $options options that will be used in configuring the service
*/
public function objectStoreCdnV1(array $options = []): ObjectStoreCdnService
{
$defaults = ['catalogName' => 'cloudFilesCDN', 'catalogType' => 'rax:object-cdn'];
return $this->rsBuilder->createService('ObjectStoreCdn\\v1', array_merge($defaults, $options));
}
}