set_request_class ( $class )

Set a custom class for this functionality. Use this method when extending/overriding existing classes with new functionality.

The replacement class must extend from CFRequest.

Access

public

Parameters

Parameter

Type

Required

Description

$class

string

Optional

The name of the new class to use for this functionality.

Examples

Set the request class to use in the toolkit.

The new request class must extend from CFRequest.

Note: This method is inherited by all service-specific classes.

// Custom class to extend RequestCore
class TestRequestCore extends RequestCore
{
	public function test_method()
	{
		return true;
	}
}

// Instantiate class and set new class
$sdb = new AmazonSDB();
$sdb->set_request_class('TestRequestCore');

// Test if the value was set
var_dump($sdb->request_class);
Result:
string(15) "TestRequestCore"

Source

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

public function set_request_class($class = 'CFRequest')
{
    $this->request_class = $class;
    return $this;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback