BoundArgument.php 947 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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\Argument;
  11. /**
  12. * @autor ThurData <info@thurdata.ch>
  13. */
  14. final class BoundArgument implements ArgumentInterface
  15. {
  16. private static $sequence = 0;
  17. private $value;
  18. private $identifier;
  19. private $used;
  20. public function __construct($value)
  21. {
  22. $this->value = $value;
  23. $this->identifier = ++self::$sequence;
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function getValues()
  29. {
  30. return array($this->value, $this->identifier, $this->used);
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function setValues(array $values)
  36. {
  37. list($this->value, $this->identifier, $this->used) = $values;
  38. }
  39. }