+ //Trigger error about empty filters ?
+ //XXX: There may be a legitimate case where we want only a merged file or an error, feel free to contact the author in such case
+ #throw new Error('Empty filters token', $token->getLine(), $stream->getSourceContext());
+ }
+
+ //Retrieve asset uri
+ //XXX: this path is the merge of services.assets.path_package.arguments[0] and rapsys_pack.output.(css,img,js)
+ if (($outputUrl = $this->package->getUrl($output)) === false) {
+ throw new Error(sprintf('Unable to get url for asset: %s', $output), $token->getLine(), $stream->getSourceContext());
+ }
+
+ //Check if we have a bundle path
+ if ($output[0] == '@') {
+ //Check that we have a / separator between bundle name and path
+ if (($pos = strpos($output, '/')) === false) {
+ throw new Error(sprintf('Invalid output path "%s"', $output), $token->getLine(), $stream->getSourceContext());
+ }
+ //Resolve bundle prefix
+ $output = $this->locator->locate(substr($output, 0, $pos)).substr($output, $pos + 1);