ALIOSS::set_bucket_acl PHP Метод

set_bucket_acl() публичный Метод

Set bucket'ACL
С версии: 2011-11-14
Автор: [email protected]
public set_bucket_acl ( string $bucket, string $acl, array $options = null ) : ResponseCore
$bucket string (Required)
$acl string (Required)
$options array (Optional)
Результат ResponseCore
    public function set_bucket_acl($bucket, $acl, $options = null)
    {
        //options
        $this->validate_options($options);
        if (!$options) {
            $options = array();
        }
        //bucket
        $this->is_empty($bucket, OSS_BUCKET_IS_NOT_ALLOWED_EMPTY);
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = 'PUT';
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_HEADERS] = array(self::OSS_ACL => $acl);
        $response = $this->auth($options);
        return $response;
    }