lib/Beberlei/AzureBlobStorage/BlobClient.php
public function setContainerAcl($containerName = '', $acl = self::ACL_PRIVATE, $signedIdentifiers = array())
    {
        Assertion::notEmpty($containerName, 'Container name is not specified');
        self::assertValidContainerName($containerName);

        $headers = array();

        // Acl specified?
        if ($acl != self::ACL_PRIVATE && !is_null($acl) && $acl != '') {
            $headers[Storage::PREFIX_STORAGE_HEADER . 'blob-public-access'] = $acl;
        }

        $policies = null;
        if (is_array($signedIdentifiers) && count($signedIdentifiers) > 0) {
            $policies  = '';
            $policies .= '<?xml version="1.0" encoding="utf-8"?>' . "\r\n";
            $policies .= '<SignedIdentifiers>' . "\r\n";
            foreach ($signedIdentifiers as $signedIdentifier) {
                $policies .= '  <SignedIdentifier>' . "\r\n";
                $policies .= '    <Id>' . $signedIdentifier->Id . '</Id>' . "\r\n";
                $policies .= '    <AccessPolicy>' . "\r\n";
                if ($signedIdentifier->Start != '')
                $policies .= '      <Start>' . $signedIdentifier->Start . '</Start>' . "\r\n";
                if ($signedIdentifier->Expiry != '')
                $policies .= '      <Expiry>' . $signedIdentifier->Expiry . '</Expiry>' . "\r\n";
                if ($signedIdentifier->Permissions != '')
                $policies .= '      <Permission>' . $signedIdentifier->Permissions . '</Permission>' . "\r\n";
                $policies .= '    </AccessPolicy>' . "\r\n";
                $policies .= '  </SignedIdentifier>' . "\r\n";
            }
            $policies .= '</SignedIdentifiers>' . "\r\n";
        }

        $response = $this->performRequest($containerName, array('restype' => 'container', 'comp' => 'acl'), 'PUT', $headers, false, $policies, self::RESOURCE_CONTAINER, self::PERMISSION_WRITE);
        if ( ! $response->isSuccessful()) {
            throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
        }
    }
public function setContainerAcl($containerName = '', $acl = self::ACL_PRIVATE, $signedIdentifiers = array())
    {
        Assertion::notEmpty($containerName, 'Container name is not specified');
        self::assertValidContainerName($containerName);

        $headers = array();

        // Acl specified?
        if ($acl != self::ACL_PRIVATE && !is_null($acl) && $acl != '') {
            $headers[Storage::PREFIX_STORAGE_HEADER . 'blob-public-access'] = $acl;
        }

        $policies = null;
        if (is_array($signedIdentifiers) && count($signedIdentifiers) > 0) {
            $policies  = '';
            $policies .= '<?xml version="1.0" encoding="utf-8"?>' . "\r\n";
            $policies .= '<SignedIdentifiers>' . "\r\n";
            foreach ($signedIdentifiers as $signedIdentifier) {
                $policies .= '  <SignedIdentifier>' . "\r\n";
                $policies .= '    <Id>' . $signedIdentifier->Id . '</Id>' . "\r\n";
                $policies .= '    <AccessPolicy>' . "\r\n";
                if ($signedIdentifier->Start != '')
                $policies .= '      <Start>' . $signedIdentifier->Start . '</Start>' . "\r\n";
                if ($signedIdentifier->Expiry != '')
                $policies .= '      <Expiry>' . $signedIdentifier->Expiry . '</Expiry>' . "\r\n";
                if ($signedIdentifier->Permissions != '')
                $policies .= '      <Permission>' . $signedIdentifier->Permissions . '</Permission>' . "\r\n";
                $policies .= '    </AccessPolicy>' . "\r\n";
                $policies .= '  </SignedIdentifier>' . "\r\n";
            }
            $policies .= '</SignedIdentifiers>' . "\r\n";
        }

        $response = $this->performRequest($containerName, array('restype' => 'container', 'comp' => 'acl'), 'PUT', $headers, false, $policies, self::RESOURCE_CONTAINER, self::PERMISSION_WRITE);
        if ( ! $response->isSuccessful()) {
            throw new BlobException($this->getErrorMessage($response, 'Resource could not be accessed.'));
        }
    }
Set container ACL

@param string $containerName Container name
@param bool $acl Blob::ACL_*
@param array $signedIdentifiers Signed identifiers
@throws BlobException