class clients_connection_broken in Web Service Clients 7.2
Same name and namespace in other branches
- 6.2 clients.inc \clients_connection_broken
Connection class for broken connections.
Hierarchy
- class \clients_connection_base
- class \clients_connection_broken
Expanded class hierarchy of clients_connection_broken
1 string reference to 'clients_connection_broken'
- clients_connection_unpack_object in ./
clients.module - CTools object factory: unpacks the data from CTools into the right class.
File
- ./
clients.inc, line 169 - Contains basic classes for client connections.
View source
class clients_connection_broken extends clients_connection_base {
/**
* Constructor method for broken connections.
*
* This expects the originator to have set a readable message in
* $object->broken_message.
*
* @param $object
* An object of class stdClass returned from CTools.
*/
function __construct($object) {
// Call the base class to set the connection properties.
$object = parent::__construct($object);
// Add some output for the view connection page.
$this->configuration['WARNING'] = t("This connection is broken.");
$this->configuration['broken message'] = $object->broken_message;
$connection_path = 'admin/build/clients/connections/' . $this->name;
if ($_GET['q'] == $connection_path) {
$message = t('This connection is broken.');
}
else {
$message = t('A connection is broken. See its <a href="@url">view page</a> for further details.', array(
'@url' => url($connection_path),
));
}
drupal_set_message($message, 'warning');
}
/**
* Fail to call a remote method with an array of parameters.
*
* This is provided so attempting to call a method on a bad connection
* throws an exception.
*
* @return
* Nothing.
*
* @throws Exception with the error the handler set on creation.
*/
function callMethodArray($method, $method_params = array()) {
throw new Exception($this->configuration['broken message']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
clients_connection_base:: |
public | property | The connection id. Only set if this is stored in the database. | |
clients_connection_base:: |
public | property | An array of further configuration options. | |
clients_connection_base:: |
public | property | The URL this connection connects to. | |
clients_connection_base:: |
public | property | The machine name of the connection. | |
clients_connection_base:: |
function | Call a remote method. | ||
clients_connection_base:: |
function | Extra form elements specific to a class's edit form. | 2 | |
clients_connection_base:: |
static | function | Submit handler for saving/updating connections of this class. | 2 |
clients_connection_base:: |
function | Format the connection's endpoint as a link. | 2 | |
clients_connection_base:: |
function | Provide buttons for the connection testing page. | 1 | |
clients_connection_broken:: |
function |
Fail to call a remote method with an array of parameters. Overrides clients_connection_base:: |
||
clients_connection_broken:: |
function |
Constructor method for broken connections. Overrides clients_connection_base:: |