Runs assets through Packager, a JavaScript Compressor/Obfuscator.
PHP Version of the Dean Edwards's Packer, ported by Nicolas Martin.
@link http://joliclic.free.fr/php/javascript-packer/en/ @author Maximilian Walter <github@max-walter.net>
Expanded class hierarchy of PackerFilter
class PackerFilter implements FilterInterface {
protected $encoding = 'None';
protected $fastDecode = true;
protected $specialChars = false;
public function setEncoding($encoding) {
$this->encoding = $encoding;
}
public function setFastDecode($fastDecode) {
$this->fastDecode = (bool) $fastDecode;
}
public function setSpecialChars($specialChars) {
$this->specialChars = (bool) $specialChars;
}
public function filterLoad(AssetInterface $asset) {
}
public function filterDump(AssetInterface $asset) {
$packer = new \JavaScriptPacker($asset
->getContent(), $this->encoding, $this->fastDecode, $this->specialChars);
$asset
->setContent($packer
->pack());
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PackerFilter:: |
public | function | ||
PackerFilter:: |
public | function | ||
PackerFilter:: |
public | function | ||
PackerFilter:: |
public | function |
Filters an asset after it has been loaded. Overrides FilterInterface:: |
|
PackerFilter:: |
public | function |
Filters an asset just before it's dumped. Overrides FilterInterface:: |
|
PackerFilter:: |
protected | property | ||
PackerFilter:: |
protected | property | ||
PackerFilter:: |
protected | property |