Gaufrette\Adapter\AzureBlobStorage::createContainer PHP Method

createContainer() public method

Creates a new container.
public createContainer ( string $containerName, MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions $options = null )
$containerName string
$options MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions
    public function createContainer($containerName, CreateContainerOptions $options = null)
    {
        $this->init();
        try {
            $this->blobProxy->createContainer($containerName, $options);
        } catch (ServiceException $e) {
            $errorCode = $this->getErrorCodeFromServiceException($e);
            if ($errorCode != self::ERROR_CONTAINER_ALREADY_EXISTS) {
                throw new \RuntimeException(sprintf('Failed to create the configured container "%s": %s (%s).', $containerName, $e->getErrorText(), $errorCode));
            }
        }
    }