public function HttpAsset::load

Loads the asset into memory and applies load filters.

You may provide an additional filter to apply during load.

Parameters

FilterInterface $additionalFilter An additional filter:

Overrides AssetInterface::load

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php, line 54

Class

HttpAsset
Represents an asset loaded via an HTTP request.

Namespace

Assetic\Asset

Code

public function load(FilterInterface $additionalFilter = null) {
  $content = @file_get_contents(VarUtils::resolve($this->sourceUrl, $this
    ->getVars(), $this
    ->getValues()));
  if (false === $content && !$this->ignoreErrors) {
    throw new \RuntimeException(sprintf('Unable to load asset from URL "%s"', $this->sourceUrl));
  }
  $this
    ->doLoad($content, $additionalFilter);
}