public function AssetWriter::__construct

Constructor.

Parameters

string $dir The base web directory:

array $values Variable values:

Throws

\InvalidArgumentException if a variable value is not a string

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php, line 36

Class

AssetWriter
Writes assets to the filesystem.

Namespace

Assetic

Code

public function __construct($dir, array $values = array()) {
  foreach ($values as $var => $vals) {
    foreach ($vals as $value) {
      if (!is_string($value)) {
        throw new \InvalidArgumentException(sprintf('All variable values must be strings, but got %s for variable "%s".', json_encode($value), $var));
      }
    }
  }
  $this->dir = $dir;
  $this->values = $values;
}