Expression.php 763 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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\ExpressionLanguage;
  11. /**
  12. * Represents an expression.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. class Expression
  17. {
  18. protected $expression;
  19. /**
  20. * @param string $expression An expression
  21. */
  22. public function __construct($expression)
  23. {
  24. $this->expression = (string) $expression;
  25. }
  26. /**
  27. * Gets the expression.
  28. *
  29. * @return string The expression
  30. */
  31. public function __toString()
  32. {
  33. return $this->expression;
  34. }
  35. }