You are here

class ServicesClientEvent in Services Client 7.2

Event representation.

Hierarchy

Expanded class hierarchy of ServicesClientEvent

1 string reference to 'ServicesClientEvent'
services_client_schema in ./services_client.install
Implementation of hook_schema().

File

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

View source
class ServicesClientEvent {

  /**
   * Event local id.
   *
   * @var int
   */
  public $eid;

  /**
   * Name of connection that should be used.
   *
   * @var string
   */
  public $connection;

  /**
   * Event admin title.
   *
   * @var string
   */
  public $title;

  /**
   * Event machine name.
   *
   * @var string
   */
  public $name;

  /**
   * Entity type processed by event.
   *
   * @var string
   */
  public $entity_type;

  /**
   * Event name, can be 'save', 'delete'.
   *
   * @var string
   */
  public $event;

  /**
   * Handler plugin name.
   *
   * @var string
   */
  public $plugin;

  /**
   * Event configuration.
   *
   * @var array
   */
  public $config;

  /**
   * Initialized event handler plugin.
   *
   * @var EventHandler
   */
  protected $handler;

  /**
   * Retrieve event handler.
   *
   * @return EventHandler
   *   Initialized plugin.
   */
  public function getHandler() {
    if ($this->handler === NULL) {
      $reflection = new ReflectionClass($this->plugin);
      $this->handler = $reflection
        ->newInstanceArgs(array(
        $this,
        $this->config,
      ));
    }
    return $this->handler;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ServicesClientEvent::$config public property Event configuration.
ServicesClientEvent::$connection public property Name of connection that should be used.
ServicesClientEvent::$eid public property Event local id.
ServicesClientEvent::$entity_type public property Entity type processed by event.
ServicesClientEvent::$event public property Event name, can be 'save', 'delete'.
ServicesClientEvent::$handler protected property Initialized event handler plugin.
ServicesClientEvent::$name public property Event machine name.
ServicesClientEvent::$plugin public property Handler plugin name.
ServicesClientEvent::$title public property Event admin title.
ServicesClientEvent::getHandler public function Retrieve event handler.