菜谱项目

Arg.php 927B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace PhpParser\Node;
  3. use PhpParser\NodeAbstract;
  4. class Arg extends NodeAbstract
  5. {
  6. /** @var Expr Value to pass */
  7. public $value;
  8. /** @var bool Whether to pass by ref */
  9. public $byRef;
  10. /** @var bool Whether to unpack the argument */
  11. public $unpack;
  12. /**
  13. * Constructs a function call argument node.
  14. *
  15. * @param Expr $value Value to pass
  16. * @param bool $byRef Whether to pass by ref
  17. * @param bool $unpack Whether to unpack the argument
  18. * @param array $attributes Additional attributes
  19. */
  20. public function __construct(Expr $value, $byRef = false, $unpack = false, array $attributes = array()) {
  21. parent::__construct($attributes);
  22. $this->value = $value;
  23. $this->byRef = $byRef;
  24. $this->unpack = $unpack;
  25. }
  26. public function getSubNodeNames() {
  27. return array('value', 'byRef', 'unpack');
  28. }
  29. }