Writes assets to the filesystem.
More...
|
static | write ($path, $contents) |
|
◆ __construct()
Assetic\AssetWriter::__construct |
( |
|
$dir, |
|
|
array |
$values = array() |
|
) |
| |
Constructor.
- Parameters
-
string | $dir | The base web directory |
array | $values | Variable values |
- Exceptions
-
Definition at line 36 of file AssetWriter.php.
38 foreach (
$values as $var => $vals) {
39 foreach ($vals as $value) {
40 if (!is_string($value)) {
41 throw new \InvalidArgumentException(sprintf(
'All variable values must be strings, but got %s for variable "%s".', json_encode($value), $var));
◆ getCombinations()
Assetic\AssetWriter::getCombinations |
( |
array |
$vars | ) |
|
|
private |
Not used.
This method is provided for backward compatibility with certain versions of AsseticBundle.
Definition at line 90 of file AssetWriter.php.
static getCombinations(array $vars, array $values)
◆ write()
static Assetic\AssetWriter::write |
( |
|
$path, |
|
|
|
$contents |
|
) |
| |
|
staticprotected |
Definition at line 73 of file AssetWriter.php.
References $contents, and $path.
75 if (!is_dir(
$dir = dirname(
$path)) &&
false === @mkdir(
$dir, 0777,
true)) {
76 throw new \RuntimeException(
'Unable to create directory '.
$dir);
80 throw new \RuntimeException(
'Unable to write file '.
$path);
◆ writeAsset()
◆ writeManagerAssets()
◆ $dir
Assetic\AssetWriter::$dir |
|
private |
◆ $values
Assetic\AssetWriter::$values |
|
private |
The documentation for this class was generated from the following file: