ConfigurationLoader.php 765 B

1234567891011121314151617181920212223242526272829
  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\Factory\Loader;
  11. use Assetic\Factory\Loader\FormulaLoaderInterface;
  12. use Assetic\Factory\Resource\ResourceInterface;
  13. use Symfony\Bundle\AsseticBundle\Factory\Resource\ConfigurationResource;
  14. /**
  15. * Loads configured formulae.
  16. *
  17. * @author Kris Wallsmith <kris@symfony.com>
  18. */
  19. class ConfigurationLoader implements FormulaLoaderInterface
  20. {
  21. public function load(ResourceInterface $resource)
  22. {
  23. return $resource instanceof ConfigurationResource ? $resource->getContent() : array();
  24. }
  25. }