Param.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @property string $name Name
  4. * @property null|PHPParser_Node_Expr $default Default value
  5. * @property null|string|PHPParser_Node_Name $type Typehint
  6. * @property bool $byRef Whether is passed by reference
  7. */
  8. class PHPParser_Node_Param extends PHPParser_NodeAbstract
  9. {
  10. /**
  11. * Constructs a parameter node.
  12. *
  13. * @param string $name Name
  14. * @param null|PHPParser_Node_Expr $default Default value
  15. * @param null|string|PHPParser_Node_Name $type Typehint
  16. * @param bool $byRef Whether is passed by reference
  17. * @param array $attributes Additional attributes
  18. */
  19. public function __construct($name, $default = null, $type = null, $byRef = false, array $attributes = array()) {
  20. parent::__construct(
  21. array(
  22. 'name' => $name,
  23. 'default' => $default,
  24. 'type' => $type,
  25. 'byRef' => $byRef
  26. ),
  27. $attributes
  28. );
  29. }
  30. }