Overview

Namespaces

  • Pharborist
    • Constants
    • ControlStructures
    • Exceptions
    • Functions
    • Generators
    • Namespaces
    • Objects
    • Operators
    • Types
    • Variables

Classes

  • Pharborist\Variables\CompoundVariableNode
  • Pharborist\Variables\GlobalStatementNode
  • Pharborist\Variables\ReferenceVariableNode
  • Pharborist\Variables\StaticVariableNode
  • Pharborist\Variables\StaticVariableStatementNode
  • Pharborist\Variables\VariableNode
  • Pharborist\Variables\VariableVariableNode

Interfaces

  • Pharborist\Variables\VariableExpressionNode
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Pharborist\ControlStructures;
 3: 
 4: use Pharborist\NodeCollection;
 5: use Pharborist\ParenTrait;
 6: use Pharborist\StatementNode;
 7: use Pharborist\ExpressionNode;
 8: 
 9: /**
10:  * A switch control structure.
11:  */
12: class SwitchNode extends StatementNode {
13:   use ParenTrait;
14:   use AltSyntaxTrait;
15: 
16:   /**
17:    * @var ExpressionNode
18:    */
19:   protected $switchOn;
20: 
21:   /**
22:    * @return ExpressionNode
23:    */
24:   public function getSwitchOn() {
25:     return $this->switchOn;
26:   }
27: 
28:   /**
29:    * @return NodeCollection|CaseNode[]
30:    */
31:   public function getCases() {
32:     return new NodeCollection($this->childrenByInstance('\Pharborist\StatementNode'), FALSE);
33:   }
34: }
35: 
Pharborist API documentation generated by ApiGen