public function asset($asset, $version = null)
    {
        $host = $this->request->getHost();
        $port = $this->request->getPort();
        $path = $this->request->getBasePath();

        if ('/' !== substr($asset, 1)) {
            $asset = '/'.$asset;
        }

        if (80 === $port) {
            $port = '';
        } else {
            $port = ':'.$port;
        }

        return '//'.$host.$port.$path.$asset;
    }
public function asset($asset, $version = null)
    {
        $host = $this->request->getHost();
        $port = $this->request->getPort();
        $path = $this->request->getBasePath();

        if ('/' !== substr($asset, 1)) {
            $asset = '/'.$asset;
        }

        if (80 === $port) {
            $port = '';
        } else {
            $port = ':'.$port;
        }

        return '//'.$host.$port.$path.$asset;
    }
public function asset ( $ asset , $ version = null ) { $ host = $ this -> request -> getHost ( ) ; $ port = $ this -> request -> getPort ( ) ; $ path = $ this -> request -> getBasePath ( ) ; if ( '/' !== substr ( $ asset , 1 ) ) { $ asset = '/' . $ asset ; } if ( 80 === $ port ) { $ port = '' ; } else { $ port = ':' . $ port ; } return '//' . $ host . $ port . $ path . $ asset ; }
Get the absolute URL of an asset.

@return string
Get the absolute URL of an asset .