Overview

Namespaces

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

Classes

  • CatchNode
  • ThrowStatementNode
  • TryCatchNode
  • Overview
  • Namespace
  • Class

Class TryCatchNode

A try control structure.

Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\ParentNode implements Pharborist\ParentNodeInterface
Extended by Pharborist\StatementNode
Extended by Pharborist\Exceptions\TryCatchNode
Namespace: Pharborist\Exceptions
Located at Exceptions/TryCatchNode.php
Methods summary
public Pharborist\Node
# getTry( )

Returns

Pharborist\Node
public Pharborist\Exceptions\CatchNode[]
# getCatches( )

Returns

Pharborist\Exceptions\CatchNode[]
public Pharborist\Node
# getFinally( )

Returns

Pharborist\Node
public boolean
# catches( string $exception )

Returns if this try/catch has a catch for a certain exception type.

Returns if this try/catch has a catch for a certain exception type.

Parameters

$exception

... At least one exception type to check for. Each should be a fully qualified name, e.g. \Exception instead of Exception.

Returns

boolean
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()
Pharborist API documentation generated by ApiGen