Esempio n. 1
0
 /**
  * tries to include the requested plugin and returns the plugin class name, or false if plugin not found.
  * @param string $pluginName name of the plugin
  * @return string class name or false if not found
  */
 protected function _load($pluginName, $section)
 {
     $cleanName = FileUtils::sanitize($pluginName);
     $className = strtolower("Plugins_{$cleanName}_{$section}");
     if (M::resolve_class($className, 'plugins', function () use($cleanName) {
         PluginRegistry::initPlugin($cleanName);
     })) {
         return $className;
     }
 }