private function GlobAsset::initialize

Initializes the collection based on the glob(s) passed in.

5 calls to GlobAsset::initialize()
GlobAsset::all in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Returns all child assets.
GlobAsset::dump in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Applies dump filters and returns the asset as a string.
GlobAsset::getIterator in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Returns an iterator for looping recursively over unique leaves.
GlobAsset::getLastModified in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Returns the highest last-modified value of all assets in the current collection.
GlobAsset::load in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Loads the asset into memory and applies load filters.

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php, line 97

Class

GlobAsset
A collection of assets loaded by glob.

Namespace

Assetic\Asset

Code

private function initialize() {
  foreach ($this->globs as $glob) {
    $glob = VarUtils::resolve($glob, $this
      ->getVars(), $this
      ->getValues());
    if (false !== ($paths = glob($glob))) {
      foreach ($paths as $path) {
        if (is_file($path)) {
          $this
            ->add(new FileAsset($path, array(), $this
            ->getSourceRoot()));
        }
      }
    }
  }
  $this->initialized = true;
}