You are here

class ServicesClientConnectionPlugin in Services Client 7

Same name and namespace in other branches
  1. 7.2 services_client_connection/include/plugin.inc \ServicesClientConnectionPlugin

Base plugin class

Hierarchy

Expanded class hierarchy of ServicesClientConnectionPlugin

1 string reference to 'ServicesClientConnectionPlugin'
services_client_connection_get_plugin_default in services_client_connection/services_client_connection.module
Get default plugin name for type

File

services_client_connection/include/plugin.inc, line 12
Base plugin definitions. All other plugins should be extended from this set of plugins.

View source
class ServicesClientConnectionPlugin {

  /**
   * Connection definition
   */
  protected $connection;

  /**
   * Plugin specific configuration
   *
   * @var array
   */
  protected $config;

  /**
   * Reference to client
   *
   * @var ServicesClientConnection
   */
  protected $client;
  public function __construct($connection, $config, $client = NULL) {

    // Store configuration and connection definition
    $this->connection = $connection;
    $this->config = $config;
    $this->client = $client;
  }

  /**
   * Configuration form options
   */
  public function configForm(&$form, &$form_state) {
    $form['markup'] = array(
      '#type' => 'item',
      '#markup' => t("This plugin doesn't provide any configuration options."),
    );
  }
  public function configFormValidate(&$form, &$form_state) {
  }
  public function configFormSubmit(&$form, &$form_state) {
  }

  /**
   * Allows module to alter data in process of request
   *
   * @param ServicesClientConnectionHttpRequest $request
   */
  public function prepareRequest(ServicesClientConnectionHttpRequest &$request) {
  }
  public function processResponse(ServicesClientConnectionResponse &$response) {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ServicesClientConnectionPlugin::$client protected property Reference to client
ServicesClientConnectionPlugin::$config protected property Plugin specific configuration
ServicesClientConnectionPlugin::$connection protected property Connection definition
ServicesClientConnectionPlugin::configForm public function Configuration form options 5
ServicesClientConnectionPlugin::configFormSubmit public function 5
ServicesClientConnectionPlugin::configFormValidate public function 1
ServicesClientConnectionPlugin::prepareRequest public function Allows module to alter data in process of request 5
ServicesClientConnectionPlugin::processResponse public function 2
ServicesClientConnectionPlugin::__construct public function 1