set_vhost ( $vhost )

Sets the virtual host to use in place of the default bucket.s3.amazonaws.com domain.

Access

public

Parameters

Parameter

Type

Required

Description

$vhost

string

Required

The virtual host to use in place of the default bucket.s3.amazonaws.com domain.

Returns

Type

Description

$this

A reference to the current instance.

Examples

Configure a virtual host to use for requests.

// Instantiate the class
$s3 = new AmazonS3();
$s3->set_vhost('cname.example.com');

$response = $s3->list_buckets();

// Success?
var_dump($response->isOK());
Result:
bool(true)

See Also

Source

Method defined in services/s3.class.php | Toggle source view (5 lines) | View on GitHub

public function set_vhost($vhost)
{
    $this->vhost = $vhost;
    return $this;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback