Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function filterContent(AssetInterface $asset)
 {
     // has path?
     if (!($path = $asset->getOption('path'))) {
         return;
     }
     // set base path
     $this->path = dirname($this->url->to($path)) . '/';
     $asset->setContent(preg_replace_callback('/url\\(\\s*[\'"]?(?![a-z]+:|\\/+)([^\'")]+)[\'"]?\\s*\\)/i', array($this, 'rewrite'), $asset->getContent()));
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  * @param Request          $request
  * @param LocatorInterface $locator
  * @param array            $option
  */
 public function __construct(Request $request, LocatorInterface $locator, $option)
 {
     parent::__construct($request, $locator);
     $this->option = compact('option');
 }