Set a custom class for this functionality. Use this method when extending/overriding existing classes with new functionality.
The replacement class must extend from CFResponse
.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Optional |
The name of the new class to use for this functionality. |
Returns
Type |
Description |
---|---|
A reference to the current instance. |
Examples
Set the response class to use in the toolkit.
The new response class must extend from CFResponse
.
Note: This method is inherited by all service-specific classes.
// Custom class to extend ResponseCore class TestResponseCore extends ResponseCore { public function test_method() { return true; } } // Instantiate class and set new class $sdb = new AmazonSDB(); $sdb->set_response_class('TestResponseCore'); // Test if the value was set var_dump($sdb->response_class);Result:
string(16) "TestResponseCore"
Source
Method defined in sdk.class.php | Toggle source view (5 lines) | View on GitHub