examples/Client/CloudSubscription.php
public function createStorageService(
        $name,
        $execType = self:: SYNCHRONOUS,
        $location = 'East US'
    ) {
        $cloudStorageService = null;

        if (!$this->storageServiceExists($name)) {
            $options = new CreateServiceOptions();
            $options->setLocation($location);
            $result = $this->_proxy->createStorageService(
                $name,
                base64_encode($name),
                $options
            );

            if ($execType == self::SYNCHRONOUS) {
                $this->_blockUntilAsyncFinish($result);
            }
            $newStorageService = true;
        }

        $keys = $this->_proxy->getStorageServiceKeys($name);
        $properties = $this->_proxy->getStorageServiceProperties($name);

        $cloudStorageService = new CloudStorageService(
            $name,
            $keys->getPrimary(),
            $properties->getStorageService()->getBlobEndpointUri(),
            $properties->getStorageService()->getQueueEndpointUri(),
            $properties->getStorageService()->getTableEndpointUri()
        );

        return $cloudStorageService;
    }
public function createStorageService(
        $name,
        $execType = self:: SYNCHRONOUS,
        $location = 'East US'
    ) {
        $cloudStorageService = null;

        if (!$this->storageServiceExists($name)) {
            $options = new CreateServiceOptions();
            $options->setLocation($location);
            $result = $this->_proxy->createStorageService(
                $name,
                base64_encode($name),
                $options
            );

            if ($execType == self::SYNCHRONOUS) {
                $this->_blockUntilAsyncFinish($result);
            }
            $newStorageService = true;
        }

        $keys = $this->_proxy->getStorageServiceKeys($name);
        $properties = $this->_proxy->getStorageServiceProperties($name);

        $cloudStorageService = new CloudStorageService(
            $name,
            $keys->getPrimary(),
            $properties->getStorageService()->getBlobEndpointUri(),
            $properties->getStorageService()->getQueueEndpointUri(),
            $properties->getStorageService()->getTableEndpointUri()
        );

        return $cloudStorageService;
    }
public function createStorageService ( $ name , $ execType = self :: SYNCHRONOUS , $ location = 'East US' ) { $ cloudStorageService = null ; if ( ! $ this -> storageServiceExists ( $ name ) ) { $ options = new CreateServiceOptions ( ) ; $ options -> setLocation ( $ location ) ; $ result = $ this -> _proxy -> createStorageService ( $ name , base64_encode ( $ name ) , $ options ) ; if ( $ execType == self :: SYNCHRONOUS ) { $ this -> _blockUntilAsyncFinish ( $ result ) ; } $ newStorageService = true ; } $ keys = $ this -> _proxy -> getStorageServiceKeys ( $ name ) ; $ properties = $ this -> _proxy -> getStorageServiceProperties ( $ name ) ; $ cloudStorageService = new CloudStorageService ( $ name , $ keys -> getPrimary ( ) , $ properties -> getStorageService ( ) -> getBlobEndpointUri ( ) , $ properties -> getStorageService ( ) -> getQueueEndpointUri ( ) , $ properties -> getStorageService ( ) -> getTableEndpointUri ( ) ) ; return $ cloudStorageService ; }
Creates a storage service if it does not exist and waits until it is created.

@param string   $name     The storage service name.
@param string   $execType The execution type for this call.
@param Location $location The storage service location. By default East US.

@return CloudStorageService
Creates a storage service if it does not exist and waits until it is created .