public function webpackPublic($url)
    {
        $public_dir = '/' . ltrim($this->dump_path, '/');

        $url = preg_replace_callback('/^@(?<bundle>\w+)/', function ($match) {
            $str = $match['bundle'];
            if (substr($str, \strlen($str) - 6) === 'Bundle') {
                $str = substr($str, 0, -6);
            }
            return strtolower($str);
        }, $url);

        return rtrim($public_dir, '/') . '/' . ltrim($url, '/');
    }
public function webpackPublic($url)
    {
        $public_dir = '/' . ltrim($this->dump_path, '/');

        $url = preg_replace_callback('/^@(?<bundle>\w+)/', function ($match) {
            $str = $match['bundle'];
            if (substr($str, \strlen($str) - 6) === 'Bundle') {
                $str = substr($str, 0, -6);
            }
            return strtolower($str);
        }, $url);

        return rtrim($public_dir, '/') . '/' . ltrim($url, '/');
    }
public function webpackPublic ( $ url ) { $ public_dir = '/' . ltrim ( $ this -> dump_path , '/' ) ; $ url = preg_replace_callback ( '/^@(?<bundle>\w+)/' , function ( $ match ) { $ str = $ match [ 'bundle' ] ; if ( substr ( $ str , \ strlen ( $ str ) - 6 ) === 'Bundle' ) { $ str = substr ( $ str , 0 , - 6 ) ; } return strtolower ( $ str ) ; } , $ url ) ; return rtrim ( $ public_dir , '/' ) . '/' . ltrim ( $ url , '/' ) ; }
Returns the mapped url for the given resource.

For example:
given url: "@AppBundle/images/foo.png"
real path: "AppBundle/Resources/public/images/foo.png"
mapped to: "/<dump_path>/app/images/foo.png"

The mapped url is either a symlink or copied asset that resides in the <dump_path> directory.

@param  string $url
@return string
Returns the mapped url for the given resource .