public function plugin($plugin)
{
if (is_array($plugin)) {
return $this->plugins($plugin);
}
if (isset($this->_ci_plugins[$plugin])) {
return $this;
}
list($path, $_plugin) = Modules::find($plugin . '_pi', $this->_module, 'plugins/');
if ($path === FALSE && !is_file($_plugin = APPPATH . 'plugins/' . $_plugin . EXT)) {
show_error("Unable to locate the plugin file: {$_plugin}");
}
Modules::load_file($_plugin, $path);
$this->_ci_plugins[$plugin] = TRUE;
return $this;
}