ArgumentsNode.php 819 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\Node;
  11. use Symfony\Component\ExpressionLanguage\Compiler;
  12. /**
  13. * @author Fabien Potencier <fabien@symfony.com>
  14. *
  15. * @internal
  16. */
  17. class ArgumentsNode extends ArrayNode
  18. {
  19. public function compile(Compiler $compiler)
  20. {
  21. $this->compileArguments($compiler, false);
  22. }
  23. public function toArray()
  24. {
  25. $array = [];
  26. foreach ($this->getKeyValuePairs() as $pair) {
  27. $array[] = $pair['value'];
  28. $array[] = ', ';
  29. }
  30. array_pop($array);
  31. return $array;
  32. }
  33. }