For.php 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @property PHPParser_Node_Expr[] $init Init expressions
  4. * @property PHPParser_Node_Expr[] $cond Loop conditions
  5. * @property PHPParser_Node_Expr[] $loop Loop expressions
  6. * @property PHPParser_Node[] $stmts Statements
  7. */
  8. class PHPParser_Node_Stmt_For extends PHPParser_Node_Stmt
  9. {
  10. /**
  11. * Constructs a for loop node.
  12. *
  13. * @param array $subNodes Array of the following optional subnodes:
  14. * 'init' => array(): Init expressions
  15. * 'cond' => array(): Loop conditions
  16. * 'loop' => array(): Loop expressions
  17. * 'stmts' => array(): Statements
  18. * @param array $attributes Additional attributes
  19. */
  20. public function __construct(array $subNodes = array(), array $attributes = array()) {
  21. parent::__construct(
  22. $subNodes + array(
  23. 'init' => array(),
  24. 'cond' => array(),
  25. 'loop' => array(),
  26. 'stmts' => array(),
  27. ),
  28. $attributes
  29. );
  30. }
  31. }