StaticExtension.php 893 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of the Symfony framework.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Symfony\Bundle\AsseticBundle\Twig;
  11. use Assetic\Extension\Twig\AsseticExtension;
  12. use Assetic\Factory\AssetFactory;
  13. /**
  14. * The static extension is used when use_controllers is disabled.
  15. *
  16. * @author Kris Wallsmith <kris.wallsmith@symfony.com>
  17. */
  18. class StaticExtension extends AsseticExtension
  19. {
  20. public function getTokenParsers()
  21. {
  22. return array(
  23. new StaticTokenParser($this->factory, 'javascripts', 'js/*.js', $this->debug),
  24. new StaticTokenParser($this->factory, 'stylesheets', 'css/*.css', $this->debug),
  25. new StaticTokenParser($this->factory, 'image', 'images/*', $this->debug, true),
  26. );
  27. }
  28. }