MiniAsset\Filter\Sprockets::_findFile PHP Метод

_findFile() защищенный Метод

Locates sibling files, or uses AssetScanner to locate <> style dependencies.
protected _findFile ( string $filename, string $path = null ) : string
$filename string The basename of the file needing to be found.
$path string The path for same directory includes.
Результат string Path to file.
    protected function _findFile($filename, $path = null)
    {
        if (substr($filename, -2) !== 'js') {
            $filename .= '.js';
        }
        if ($path && file_exists($path . $filename)) {
            return $path . $filename;
        }
        $file = $this->_scanner()->find($filename);
        if ($file) {
            return $file;
        }
        throw new \Exception('Sprockets - Could not locate file "' . $filename . '"');
    }