AssetCompress\AssetScanner::_expandPlugin PHP Method

_expandPlugin() protected method

Resolve a plugin file to its full path.
protected _expandPlugin ( string $file ) : string
$file string The theme file to find.
return string The expanded path
    protected function _expandPlugin($file)
    {
        preg_match(self::PLUGIN_PATTERN, $file, $matches);
        if (empty($matches[1]) || empty($matches[2])) {
            throw new RuntimeException('Missing required parameters');
        }
        if (!Plugin::loaded($matches[1])) {
            throw new RuntimeException($matches[1] . ' is not a loaded plugin.');
        }
        $path = Plugin::path($matches[1]);
        return $path . 'webroot' . DS . $matches[2];
    }