ExpressionLanguage.php 956 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\DependencyInjection;
  11. use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
  12. /**
  13. * Adds some function to the default ExpressionLanguage.
  14. *
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. *
  17. * @see ExpressionLanguageProvider
  18. */
  19. class ExpressionLanguage extends BaseExpressionLanguage
  20. {
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function __construct($cache = null, array $providers = array(), callable $serviceCompiler = null)
  25. {
  26. // prepend the default provider to let users override it easily
  27. array_unshift($providers, new ExpressionLanguageProvider($serviceCompiler));
  28. parent::__construct($cache, $providers);
  29. }
  30. }