[className description]
@param boolean $plugin [description]
@return [type]
172581
public function className($plugin = true) {
		return (($plugin && !empty($this->plugin)) ? $this->plugin . '.' : '') . $this->name;
	}
820959
public function get($plugin)
    {
        $pluginJson = $this->backend->getPluginInfo($plugin);

        $this->validate($pluginJson);

        $pluginStruct = $this->hydrator->get($pluginJson);

        return new InfoDecorator($pluginStruct);
    }
731371
protected function getPluginClassByName($name)
    {
        if (array_key_exists($name, $this->plugins) === false) {
            return false;
        }

        return $this->plugins[$name];
    }
70878
public static function getMappedClassName($className)
    {
        $mappedName = array_search($className, self::$classMap);

        if ($mappedName) {
            return $mappedName;
        }

        $mappedName = array_search($className, array_flip(self::$classMap));

        if ($mappedName) {
            return $mappedName;
        }

        return false;
    }
275682
def from_plugin_classname(plugin_classname, exclude_lines_regex=None, **kwargs):
    
    klass = globals()[plugin_classname]

    # Make sure the instance is a BasePlugin type, before creating it.
    if not issubclass(klass, BasePlugin):
        raise TypeError

    try:
        instance = klass(exclude_lines_regex=exclude_lines_regex, **kwargs)
    except TypeError:
        log.warning(
            'Unable to initialize plugin!',
        )
        raise

    return instance
422014
private function getPaths($plugin): array
    {
        if ($plugin === null || !Plugin::loaded($plugin)) {
            return App::path('Template');
        }

        return App::path('Template', $plugin);
    }
1323234
public static function isBoldgridPlugin( $plugin ) {
		if( empty( $plugin ) ) {
			return false;
		}

		$pluginChecker = new \Boldgrid\Library\Library\Plugin\Checker();

		$plugins = \Boldgrid\Library\Library\Util\Plugin::getFiltered( $pluginChecker->getPluginPattern() );

		return array_key_exists( $plugin, $plugins );
	}
374849
def get_plugin_class(self, plugin_type, plugin_name):
        """"""
        plugin = self._get_plugin_type(plugin_type)
        return plugin.get_plugin_class(plugin_name)
369549
public function findClassName($className)
    {
        if (!empty($this->lookupCache->classes[$className])) {
            return $this->lookupCache->classes[$className];
        }

        if (class_exists($className)) return $className;
        $startsWithSlash = ($className[0] == '\\');

        foreach ($this->searchOrder as $namespace)
        {
            $testClass = '\\' . $namespace;
            if (!$startsWithSlash) {
                $testClass .= '\\';
            }

            $testClass .= $className;

            if (class_exists($testClass)) {
                $this->lookupCache->classes[$className] = $testClass;
                return $testClass;
            }
        }

        return null;
    }
839903
protected function _import($plugin, $autocreate = true, $dispatcher = null)
    {
        $type = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->type);
        $element  = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->element);
        $path	= ANPATH_PLUGINS.DS.$type.DS.$element.'.php';

        if (isset($this->_paths[$path]) && $this->_paths[$path] === true) {
           return true;
        }

        if(! file_exists($path)) {
           $this->_paths[$path] = false;
           return false;
        }

        require_once($path);
        $this->_paths[$path] = true;

        if ($autocreate) {
            $className = 'plg'.ucfirst($type).ucfirst($element);
            if (class_exists($className)) {
                $config = array(
                  'id' => $plugin->id,
                  'name' => $plugin->name,
                  'type' => $plugin->type,
                  'element' => $plugin->element,
                  'meta' => $plugin->meta
                );
                $config = new AnConfig($config);
                $instance = new $className($dispatcher, $config);
            }
        }

        return true;
    }
68051
protected function _camelizePlugin($plugin) {
		if (strpos($plugin, '/') === false) {
			return Inflector::camelize($plugin);
		}
		list($vendor, $plugin) = explode('/', $plugin, 2);
		return Inflector::camelize($vendor) . '/' . Inflector::camelize($plugin);
	}
1158488
protected function init(&$plugin, $autocreate = true, $dispatcher = null)
	{
		$plugin->type = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->type);
		$plugin->name = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->name);

		$classNameL = 'plg' . $plugin->type . $plugin->name;
		$classNameN = 'Plugins\\' . ucfirst($plugin->type) . '\\' . ucfirst($plugin->name);

		// If the class exists, the file was already loaded
		if (!class_exists($classNameL) && !class_exists($classNameN))
		{
			$path = $this->path($plugin->type, $plugin->name) . DS . $plugin->name . '.php';

			if (file_exists($path))
			{
				require_once $path;

				if ($autocreate)
				{
					foreach (array($classNameL, $classNameN) as $className)
					{
						if (!class_exists($className))
						{
							continue;
						}

						// Makes sure we have an event dispatcher
						if (!($dispatcher instanceof DispatcherInterface))
						{
							$dispatcher = new Dispatcher();
						}

						// Instantiate and register the plugin.
						return new $className($dispatcher, (array) $plugin);
					}
				}
			}
		}

		return null;
	}
465452
public static function pluginClassQuestion($suffix = '') {
    $default_class = function ($vars) use ($suffix) {
      $unprefixed_plugin_id = preg_replace('/^' . $vars['machine_name'] . '_/', '', $vars['plugin_id']);
      return Utils::camelize($unprefixed_plugin_id) . $suffix;
    };
    return new Question('Plugin class', $default_class);
  }
371260
protected function checkSimple($plugin)
    {
        return ForumEnv::get('FORUM_ROOT') . 'plugins' . DIRECTORY_SEPARATOR . $plugin .
            DIRECTORY_SEPARATOR . $this->getNamespace($plugin) . '.php';
    }
726722
public function getRequiredBy($plugin)
    {
        $requiredBy = [];
        $plugin = $this->getBundle($plugin);

        foreach ($this->getInstalledBundles() as $bundle) {
            $requirements = $bundle['instance']->getRequiredPlugins();
            if (in_array(get_class($plugin), $requirements)) {
                $requiredBy[] = get_class($bundle['instance']);
            }
        }

        return $requiredBy;
    }
23765
public static function plugin($plugin)
    {
        $templates = [];

        foreach (App::path('Template', $plugin) as $path) {
            $templates = array_merge($templates, static::iteratePath($path));
        }

        return $templates;
    }
251279
protected function getMenuMethods($plugin)
    {
        //Gets all methods from `$PLUGIN\View\Helper\MenuHelper`
        $methods = get_child_methods(sprintf('\%s\View\Helper\MenuHelper', $plugin));

        //Filters invalid name methods and returns
        return $methods ? array_values(preg_grep('/^(?!_).+$/', $methods)) : [];
    }