You are here

protected function ServicesClientMappingPlugin::getPluginInstance in Services Client 7.2

2 calls to ServicesClientMappingPlugin::getPluginInstance()
ServicesClientMappingPlugin::getFormatter in include/mapping.inc
ServicesClientMappingPlugin::getReader in include/mapping.inc

File

include/mapping.inc, line 139

Class

ServicesClientMappingPlugin
Mapping plugin wrapper which represents mapping row.

Code

protected function getPluginInstance($type, $name = NULL) {
  $name = !empty($name) ? $name : $this->config[$type];
  if (!empty($name)) {
    $config = isset($this->config[$type . '_config']) ? $this->config[$type . '_config'] : array();
    return $this
      ->getPlugin($name, $config);
  }
  else {
    return NULL;
  }
}