Get information about a plugin.

@param string $name

@return string Plugin filename and path.
512627
public function getPlugin($name)
    {
        foreach (array_keys(get_plugins()) as $file) {
            // Logic taken from WP-CLI.
            if ($file === "{$name}.php" || ($name && $file === $name) || (dirname($file) === $name && $name !== '.')) {
                return $file;
            }
        }

        return '';
    }
556093
def get_plugin_info(self, plugin_name):
        """"""
        if plugin_name:
            for i in self.get_all_plugins:
                if i["plugin_name"] == plugin_name:
                    return i
415504
public function getFilename($name)
    {
        if (!$this->validateCmsObject($name)) {
            return parent::getFilename($name);
        }

        return $this->obj->getFilePath();
    }
1092580
public function getFilePath($name, $extension = '.php')
    {
        $filename = trim(dotToPath($name), '/') . $extension;
        $file = null;
        foreach ($this->paths as $dir) {
            $realName = nPath($dir, $filename);
            if (file_exists($realName)) {
                $file = $realName;
                break;
            }
        }
        return $file;
    }
180039
protected function getCacheKey($name) {
        $filename = str_replace('\\',DIRECTORY_SEPARATOR,$this->options['path'] . $name . $this->options['ext']);
        return $filename;
    }
402972
public function getViewFile($name){
        if(isset($this->options['locator'])){
            if($path = call_user_func($this->options['locator'], $name)){
                return $path;
            }
        }
        $path = '';
        if(isset($this->options['root'])){
            $path.=$this->options['root'].'/';
        }
        
        $path.=$name;
        return $path;
    }
525549
private function parse_name($name) {
        $bits = explode('/', $name);
        $name = array_pop($bits);
        $plugin = '';
        if ($bits) {
            $plugin = array_pop($bits);
            if ($plugin === 'moodle') {
                $plugin = '';
            }
        }
        return 's_'.$plugin.'_'.$name;
    }
337100
protected function getPath($name) {
		$path = [];
		$matches = null;
		preg_match('/^([^\[]+)/', $name, $matches);
		$path[] = $matches[0];
		preg_match_all('/\[([^\]]*)\]/', $name, $matches);
		$path = array_merge($path, $matches[1]);

		return $path;
	}
1323692
public function getContainerPlugin($name)
    {
        if (!$this->hasContainerPlugin($name)) {
            throw new PluginException(sprintf('Container plugin "%s" is not registered.', $name));
        }

        return $this->containerPlugins[$name];
    }
590089
public static function getPluginClass(string $name): string
    {
        $class = "";
        if (empty($name) === false && empty(self::$plugin_classes[$name]) === false) {
            $class = self::$plugin_classes[$name];
        }
        return $class;
    }
285572
public function get( $name ) {
		// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Calling native WordPress hook.
		foreach ( apply_filters( 'all_plugins', get_plugins() ) as $file => $_ ) {
			if ( "$name.php" === $file ||
				( $name && $file === $name ) ||
				( dirname( $file ) === $name && '.' !== $name ) ) {
				return (object) compact( 'name', 'file' );
			}
		}

		return false;
	}
1128003
public function get(string $name): string {
        if (!isset($this->get[$name])) {
            return "";
        }
        return $this->get[$name];
    }
898953
public function getOptionsPlugin($name = '') {
		if ($name) {
			return isset($this->options['plugin'][$name])? $this->options['plugin'][$name] : array();
		} else {
			return $this->options['plugin'];
		}
	}
189744
public function getViewFile($name)
    {
        list($plugin, $name) = $this->pluginSplit($name);
        $return = null;
        foreach ($this->_paths($plugin) as $path) {
            $viewFile = FS::clean($path . $name . $this->_ext);
            if (FS::isFile($viewFile)) {
                $return = $this->_checkFilePath($viewFile, $path);
                break;
            }
        }

        return $return;
    }
37113
public function getPathToLogFile($name = 'm62')
    {
        if (is_null($this->log_path)) {
            $this->log_path = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'logs') . DIRECTORY_SEPARATOR . $name . '.log';
        }
        
        return $this->log_path;
    }
310193
public static function getTag(string $name)
    {
        if (isset(self::$tags[$name])) {
            return self::$tags[$name];
        }
        $class = '\\sdopx\\plugin\\' . Utils::toCamel($name) . 'Tag';
        if (class_exists($class)) {
            self::$tags[$name] = new $class();
            return self::$tags[$name];
        }
        return null;
    }
640265
def get_plugin(self, name):
        
        for p in self._plugins:
            if p.name == name:
                return p
        return None