Last active
December 19, 2015 07:09
-
-
Save enumag/5916438 to your computer and use it in GitHub Desktop.
Ivory Filter for Arachne Resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Media33; | |
| class IvoryFilter extends \Nette\Object implements \Arachne\Resources\IFilter | |
| { | |
| /** @var \Ivory\Compiler */ | |
| protected $compiler; | |
| /** | |
| * @param \Ivory\Compiler $compiler | |
| */ | |
| public function __construct(\Ivory\Compiler $compiler) | |
| { | |
| $this->compiler = $compiler; | |
| } | |
| /** | |
| * @param string | |
| * @param string | |
| * @return string | |
| */ | |
| public function __invoke($input, $file) | |
| { | |
| return $this->compiler->compileFile($file); | |
| } | |
| /** | |
| * @return string[] | |
| */ | |
| public function getIncludedFiles() | |
| { | |
| return $this->compiler->getAllFiles(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| ivory.filter: Media33\IvoryFilter | |
| ivory.compiler: | |
| class: Ivory\Compiler | |
| setup: | |
| - setDefaultUnit(px) | |
| arachne.resources: | |
| inputDirectory: %wwwDir%/app/resources | |
| cacheDirectory: %wwwDir%/cache | |
| cacheUrl: /cache | |
| cssFilters: | |
| iss: @ivory.filter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment