public function asset($asset, $scheme = null)
    {
        $suffix = false;
        $ext = strtolower(pathinfo($asset, PATHINFO_EXTENSION));
        if (is_array($this->cacheBust) && in_array($ext, $this->cacheBust,
                true) && is_string($this->assetPath)
        ) {
            $path = $this->assetPath.DIRECTORY_SEPARATOR.$this->normalize($asset);
            $suffix = is_readable($path) ? @filemtime($path) : false;
        }
        if ($suffix) {
            $asset = substr($asset, 0, -1 * strlen($ext)).$suffix.'.'.$ext;
        }

        return $this->addHost($this->assetUrl.$asset, $scheme, true);
    }
public function asset($asset, $scheme = null)
    {
        $suffix = false;
        $ext = strtolower(pathinfo($asset, PATHINFO_EXTENSION));
        if (is_array($this->cacheBust) && in_array($ext, $this->cacheBust,
                true) && is_string($this->assetPath)
        ) {
            $path = $this->assetPath.DIRECTORY_SEPARATOR.$this->normalize($asset);
            $suffix = is_readable($path) ? @filemtime($path) : false;
        }
        if ($suffix) {
            $asset = substr($asset, 0, -1 * strlen($ext)).$suffix.'.'.$ext;
        }

        return $this->addHost($this->assetUrl.$asset, $scheme, true);
    }
public function asset ( $ asset , $ scheme = null ) { $ suffix = false ; $ ext = strtolower ( pathinfo ( $ asset , PATHINFO_EXTENSION ) ) ; if ( is_array ( $ this -> cacheBust ) && in_array ( $ ext , $ this -> cacheBust , true ) && is_string ( $ this -> assetPath ) ) { $ path = $ this -> assetPath . DIRECTORY_SEPARATOR . $ this -> normalize ( $ asset ) ; $ suffix = is_readable ( $ path ) ? @ filemtime ( $ path ) : false ; } if ( $ suffix ) { $ asset = substr ( $ asset , 0 , - 1 * strlen ( $ ext ) ) . $ suffix . '.' . $ ext ; } return $ this -> addHost ( $ this -> assetUrl . $ asset , $ scheme , true ) ; }
Return a asset url. If cache burst is enabled
file last modified timestamp is appended to real file name.
When no host is set url is relative, otherwise is absolute. In the latter case is possible
to use different schemes on a per-url basis.

@param  string  $asset
@param  boolean $scheme
@return string
Return a asset url . If cache burst is enabled file last modified timestamp is appended to real file name . When no host is set url is relative otherwise is absolute . In the latter case is possible to use different schemes on a per - url basis .