You are here

public function EventHandler::getPlugin in Services Client 7.2

Retrieve existing plugin.

Parameters

string $type: Plugin type.

string $uuid: Plugin identifier.

Return value

ServicesClientPlugin Plugin instance.

File

include/event.inc, line 148

Class

EventHandler
Event handler plugin.

Code

public function getPlugin($type, $uuid) {
  $plugin = isset($this->config[$type][$uuid]) ? $this->config[$type][$uuid] : NULL;
  if ($plugin) {
    return $this
      ->getPluginInstance($plugin['type'], $plugin['config'], $uuid);
  }
  else {
    throw new Exception("Missing plugin {$type}:{$uuid}");
  }
}