allow_hostname_override ( $override )

Disables any subsequent use of the set_hostname() method.

Access

public

Parameters

Parameter

Type

Required

Description

$override

boolean

Optional

Whether or not subsequent calls to set_hostname() should be obeyed. A false value disables the further effectiveness of set_hostname(). Defaults to true.

Returns

Type

Description

$this

A reference to the current instance.

Examples

Configure hostname and resource prefix.

// Instantiate the class
$ec2 = new AmazonEC2();

// Point to the new endpoint
$ec2->set_hostname('localhost', '3000');
$ec2->set_resource_prefix('/services/mock');
$ec2->allow_hostname_override(false);

// Describe images
$response = $ec2->describe_images();

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

Source

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

public function allow_hostname_override($override = true)
{
    $this->override_hostname = $override;
    return $this;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback