@param string $assetPath

@return string|null
193783
public function getVersion($assetPath)
    {
        $assetPath = parse_url($assetPath, PHP_URL_PATH);

        if ($this->webPrefix !== substr($assetPath, 0, strlen($this->webPrefix))) {
            return null;
        }

        $assetPath = substr($assetPath, strlen($this->webPrefix));

        if (isset($this->cache[$assetPath])) {
            return $this->cache[$assetPath];
        }

        return null;
    }
12760
protected function getPath(): ?string
    {
        $path = $this->input->getOption('path');

        // First we will check for an explicitly specified path from the user. If one
        // exists we will use that as the path to the assets. This allows the free
        // storage of assets wherever is best for this developer's web projects.
        if (\is_null($path)) {
            return null;
        }

        return $this->laravel->basePath().'/'.$path;
    }
333675
public function buildAssetUrl(string $path) : string {
        return starts_with($path, '//') ? $path : $this->app['url']->asset($path);
    }
972325
public function getAssetPath(string $sourcePath)
    {
        $manifest = $this->readFile();
        $path = $this->pathHelper->prefix($sourcePath);

        if (!array_key_exists($path, $manifest)) {
            throw new Exception("Unable to locate path '{$path}' in Mix manifest.");
        }

        return $this->urlHelper->getUrl($manifest[$path]);
    }
1355186
public function isBlacklisted($assetPath)
    {
        foreach ($this->blacklist as $pattern){
            if(preg_match($pattern, $assetPath) === 1){
                return true;
            }
        }
        return false;

    }
361124
public function asset_url($path)
	{
		$url = $this->asset_path($path);

		if (filter_var($url, FILTER_VALIDATE_URL) === false)
		{
			$url = \Uri::create($url);
		}

		return $url;
	}
771779
public function getPath($path = null, $isPublic = false)
    {
        $path = RouterHelper::normalizeUrl($path);
        $assetFile = $this->skinPath . $path;

        if (File::isFile($assetFile)) {
            return $isPublic
                ? $this->publicSkinPath . $path
                : $this->skinPath . $path;
        }

        return $isPublic
            ? $this->defaultPublicSkinPath . $path
            : $this->defaultSkinPath . $path;
    }
161176
public function getAssetType(string $assetType) : AssetTypeInterface
    {
        if (!isset($this->assetTypes[$assetType])) {
            if (isset($this->assetTypesArray[$assetType])) {
                $this->assetTypes[$assetType] = ImmutableAssetType::fromArray($assetType, $this->assetTypesArray[$assetType]);
            } else {
                $this->assetTypes[$assetType] = ImmutableAssetType::fromArray($assetType, []);
            }
        }
        return $this->assetTypes[$assetType];
    }
949276
public function get(string $path): SplFileInfo
    {
        $path = ltrim($path, '\\/');
        foreach ($this->assets as $asset) {
            if ($asset->getRelativePathname() === $path) {
                return $asset;
            }
        }
        throw new NotFoundHttpException(sprintf('Unknown asset: %s', $path));
    }
340984
protected function prepareRequest(array $assets, $localPath = null)
    {
        if (substr($localPath, -1) != '/') {
            $localPath = $localPath.'/';
        }

        $this->localPath = $localPath;
        $this->storagePath = storage_path('cms/combiner/assets');

        list($assets, $extension) = $this->prepareAssets($assets);

        /*
         * Cache and process
         */
        $cacheKey = $this->getCacheKey($assets);
        $cacheInfo = $this->useCache ? $this->getCache($cacheKey) : false;

        if (!$cacheInfo) {
            $this->setHashOnCombinerFilters($cacheKey);

            $combiner = $this->prepareCombiner($assets);

            if ($this->useDeepHashing) {
                $factory = new AssetFactory($this->localPath);
                $lastMod = $factory->getLastModified($combiner);
            }
            else {
                $lastMod = $combiner->getLastModified();
            }

            $cacheInfo = [
                'version'   => $cacheKey.'-'.$lastMod,
                'etag'      => $cacheKey,
                'lastMod'   => $lastMod,
                'files'     => $assets,
                'path'      => $this->localPath,
                'extension' => $extension
            ];

            $this->putCache($cacheKey, $cacheInfo);
        }

        return $this->getCombinedUrl($cacheInfo['version']);
    }
486315
public function convert($asset, $basePath)
    {
        $pos = strrpos($asset, '.');
        if ($pos !== false) {
            $srcExt = substr($asset, $pos + 1);
            if (isset($this->commands[$srcExt])) {
                [$ext, $command] = $this->commands[$srcExt];
                $result = substr($asset, 0, $pos + 1) . $ext;
                if ($this->forceConvert || $this->isOutdated($basePath, $asset, $result, $srcExt, $ext)) {
                    $this->runCommand($command, $basePath, $asset, $result);
                }

                return $result;
            }
        }

        return $asset;
    }
615809
protected function getAsset($assetData)
    {
        try {
            $Comet = \CometPHP\Comet::getInstance();
        } catch (\CometPHP\Exceptions\CometNotBooted $e) {
            return null;
        }

        if (! is_array($assetData)) {
            $assetData = [$assetData];
        }

        $asset = $Comet['template']->getFunction('asset')->call(
            $this->template,
            $assetData
        );

        return $asset;
    }
1336090
private function rewritePathInStaticImport (Asset $asset, string $path) : string
    {
        // pass all URLs untouched, either "//..." or "schema:", where schema is a typical schema, that includes
        // http: https: and data:
        if (1 === \preg_match('~^(//|[a-z]+:)~', $path))
        {
            return $path;
        }

        $assetAtPath = $asset->getRelativeAsset($path);
        $assetAtPath = $this->cache->get($assetAtPath);

        if (null !== $assetAtPath)
        {
            // only overwrite the file name of the import
            $baseName = \basename($assetAtPath->getDumpFilePath());
            return \preg_replace('~(?<=^|/)[^/]*?$~', $baseName, $path);
        }

        return $path;
    }
449564
protected function getAssetFilesPathFromDirectory($sDirPath, $sAssetType)
    {
        if (!is_string($sDirPath) || !($sDirPath = $this->getOptions()->getRealPath($sDirPath)) && !is_dir($sDirPath)) {
            throw new \InvalidArgumentException('Directory not found : ' . $sDirPath);
        }
        if (!\AssetsBundle\AssetFile\AssetFile::assetFileTypeExists($sAssetType)) {
            throw new \InvalidArgumentException('Asset\'s type is undefined : ' . $sAssetType);
        }

        $oDirIterator = new \DirectoryIterator($sDirPath);
        $aAssets = array();
        $bRecursiveSearch = $this->getOptions()->allowsRecursiveSearch();

        // Defined expected extensions forthe given type
        if ($sAssetType === \AssetsBundle\AssetFile\AssetFile::ASSET_MEDIA) {
            $aExpectedExtensions = $this->getOptions()->getMediaExt();
        } else {
            $aExpectedExtensions = array(\AssetsBundle\AssetFile\AssetFile::getAssetFileDefaultExtension($sAssetType));
        }

        foreach ($oDirIterator as $oFile) {
            if ($oFile->isFile()) {
                if (in_array(strtolower(pathinfo($oFile->getFilename(), PATHINFO_EXTENSION)), $aExpectedExtensions, true)) {
                    $aAssets[] = $oFile->getPathname();
                }
            } elseif ($oFile->isDir() && !$oFile->isDot() && $bRecursiveSearch) {
                $aAssets = array_merge(
                        $aAssets, $this->getAssetFilesPathFromDirectory($oFile->getPathname(), $sAssetType)
                );
            }
        }
        return $aAssets;
    }
1105019
public function getUrlFromPath($assetPath)
    {
        // Ensure platform independency
        $path = str_replace('\\', '/', $assetPath);

        $filePath = pathinfo($path);

        $fileType = array_key_exists(strtolower($filePath['extension']), config('nodes.assets.providers.publicFolder.imageExtensionMimeTypes')) ? 'images' : 'data';

        // If the asset is type 'data', show the raw file. If it's 'image' we want to use the CDN
        if ($fileType == 'data') {
            return  $this->getUrlProtocol().config('nodes.assets.providers.publicFolder.domain').'/'.config('nodes.assets.providers.publicFolder.subFolder').'/'.$path;
        } else {
            $fileParts = explode('/', $path);

            return route('nodes.assets.public_folder.cdn', $fileParts);
        }
    }
820582
protected function getFilters($path, AssetInterface $asset)
    {
        $config = $this->getConfig();

        if (!empty($config[$path])) {
            return $config[$path];
        }

        if (!empty($asset->mimetype) && !empty($config[$asset->mimetype])) {
            return $config[$asset->mimetype];
        }

        $extension = strtolower(pathinfo($asset->getSourcePath(), PATHINFO_EXTENSION));

        if (!empty($config[$extension])) {
            return $config[$extension];
        }

        return [];
    }
1026926
public function relativePath($path = null)
    {
        if (null === $path) {
            return str_replace(asset('/'), '', $this->relativePath);
        }

        $this->relativePath = $path;

        return $this;
    }