src/Assets.php
public function findAsset($url)
    {
        if (empty($url)) {
            return false;
        }

        $this->asset = $this->processUrl($url);

        if ($this->asset === false) {
            return false;
        }

        // check main assets dir
        $mainAsset = $this->findMainAsset(
            $this->docRoot . DS . $this->assetDir . DS . $this->asset['asset']
        );
        if ($mainAsset !== false) {
            return $mainAsset;
        }

        // check the set theme
        $themeAsset = $this->findThemeAsset(
            $this->asset['folder'],
            $this->assetDir . DS . $this->asset['asset']
        );
        if ($themeAsset !== false) {
            return $themeAsset;
        }

        // get the last "fallback" directory
        return $this->findFallbackAsset(
            $this->assetDir . DS . $this->asset['asset'],
            $this->Folder
        );
    }
public function findAsset($url)
    {
        if (empty($url)) {
            return false;
        }

        $this->asset = $this->processUrl($url);

        if ($this->asset === false) {
            return false;
        }

        // check main assets dir
        $mainAsset = $this->findMainAsset(
            $this->docRoot . DS . $this->assetDir . DS . $this->asset['asset']
        );
        if ($mainAsset !== false) {
            return $mainAsset;
        }

        // check the set theme
        $themeAsset = $this->findThemeAsset(
            $this->asset['folder'],
            $this->assetDir . DS . $this->asset['asset']
        );
        if ($themeAsset !== false) {
            return $themeAsset;
        }

        // get the last "fallback" directory
        return $this->findFallbackAsset(
            $this->assetDir . DS . $this->asset['asset'],
            $this->Folder
        );
    }
public function findAsset ( $ url ) { if ( empty ( $ url ) ) { return false ; } $ this -> asset = $ this -> processUrl ( $ url ) ; if ( $ this -> asset === false ) { return false ; } // check main assets dir $ mainAsset = $ this -> findMainAsset ( $ this -> docRoot . DS . $ this -> assetDir . DS . $ this -> asset [ 'asset' ] ) ; if ( $ mainAsset !== false ) { return $ mainAsset ; } // check the set theme $ themeAsset = $ this -> findThemeAsset ( $ this -> asset [ 'folder' ] , $ this -> assetDir . DS . $ this -> asset [ 'asset' ] ) ; if ( $ themeAsset !== false ) { return $ themeAsset ; } // get the last "fallback" directory return $ this -> findFallbackAsset ( $ this -> assetDir . DS . $ this -> asset [ 'asset' ] , $ this -> Folder ) ; }
find the asset and create symlink
@param  string $url  Asset URL to find
@return string|bool
find the asset and create symlink