Overview

Namespaces

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

Classes

  • BreakStatementNode
  • CaseNode
  • ContinueStatementNode
  • DeclareDirectiveNode
  • DeclareNode
  • DefaultNode
  • DoWhileNode
  • ElseIfNode
  • ExitNode
  • ForeachNode
  • ForNode
  • GotoLabelNode
  • GotoStatementNode
  • IfNode
  • ImportNode
  • IncludeNode
  • IncludeOnceNode
  • RequireNode
  • RequireOnceNode
  • ReturnStatementNode
  • SwitchNode
  • WhileNode

Traits

  • AltSyntaxTrait
  • Overview
  • Namespace
  • Class

Class IfNode

An if control structure.

Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\ParentNode implements Pharborist\ParentNodeInterface
Extended by Pharborist\StatementNode
Extended by Pharborist\ControlStructures\IfNode uses Pharborist\ParenTrait, Pharborist\ControlStructures\AltSyntaxTrait
Namespace: Pharborist\ControlStructures
Located at ControlStructures/IfNode.php
Methods summary
public Pharborist\ExpressionNode
# getCondition( )

Returns

Pharborist\ExpressionNode
public Pharborist\Node
# getThen( )

Returns

Pharborist\Node
public Pharborist\NodeCollection|Pharborist\ControlStructures\ElseIfNode[]
# getElseIfs( )

Returns

Pharborist\NodeCollection|Pharborist\ControlStructures\ElseIfNode[]
public Pharborist\TokenNode
# getElseKeyword( )

The T_ELSE keyword token.

The T_ELSE keyword token.

Returns

Pharborist\TokenNode
public Pharborist\TokenNode
# getElseColon( )

The colon ':' token when using alternative syntax.

The colon ':' token when using alternative syntax.

Returns

Pharborist\TokenNode
public Pharborist\Node
# getElse( )

Returns

Pharborist\Node
Methods inherited from Pharborist\StatementNode
addCommentAbove(), getLineCount(), toComment()
Methods inherited from Pharborist\ParentNode
__clone(), __toString(), acceptVisitor(), addChild(), addChildren(), append(), childCount(), children(), clear(), find(), firstChild(), firstToken(), getSourcePosition(), getText(), getTree(), has(), isDescendant(), isEmpty(), lastChild(), lastToken(), mergeNode(), prepend(), walk()
Methods inherited from Pharborist\Node
after(), appendTo(), before(), closest(), fromValue(), furthest(), getLogicalBlock(), getRoot(), getStatement(), hasRoot(), index(), insertAfter(), insertBefore(), is(), isAllOf(), isAnyOf(), next(), nextAll(), nextToken(), nextUntil(), parent(), parents(), parentsUntil(), prependTo(), previous(), previousAll(), previousToken(), previousUntil(), remove(), replaceAll(), replaceWith(), siblings(), sortKey(), swapWith()
Methods used from Pharborist\ParenTrait
getCloseParen(), getOpenParen()
Methods used from Pharborist\ControlStructures\AltSyntaxTrait
getEndKeyword(), getOpenColon(), isAlterativeSyntax()
Pharborist API documentation generated by ApiGen