Overview

Namespaces

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

Classes

  • AnonymousFunctionNode
  • CallbackCallNode
  • CallNode
  • DefineNode
  • EmptyNode
  • EvalNode
  • FunctionCallNode
  • FunctionDeclarationNode
  • HaltCompilerNode
  • IssetNode
  • ListNode
  • ParameterNode
  • ParameterNodeCollection
  • UnsetNode

Interfaces

  • LexicalVariableNode

Traits

  • ArgumentTrait
  • FunctionTrait
  • ParameterTrait
  • Overview
  • Namespace
  • Class

Class AnonymousFunctionNode

An anonymous function (closure).

Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\ParentNode implements Pharborist\ParentNodeInterface
Extended by Pharborist\Functions\AnonymousFunctionNode implements Pharborist\ExpressionNode uses Pharborist\ParenTrait, Pharborist\Functions\ParameterTrait
Namespace: Pharborist\Functions
Located at Functions/AnonymousFunctionNode.php
Methods summary
public Pharborist\TokenNode
# getReference( )

Returns

Pharborist\TokenNode
public
# setReference( boolean $is_reference )

Parameters

$is_reference

Returns


$this
public Pharborist\CommaListNode
# getLexicalVariableList( )

Returns

Pharborist\CommaListNode
public Pharborist\NodeCollection|Pharborist\Functions\LexicalVariableNode[]
# getLexicalVariables( )

Returns

Pharborist\NodeCollection|Pharborist\Functions\LexicalVariableNode[]
public boolean
# hasLexicalVariables( )

Returns

boolean
public Pharborist\TokenNode
# getLexicalUse( )

Returns

Pharborist\TokenNode
public Pharborist\TokenNode
# getLexicalOpenParen( )

Returns

Pharborist\TokenNode
public Pharborist\TokenNode
# getLexicalCloseParen( )

Returns

Pharborist\TokenNode
public
# appendLexicalVariable( Pharborist\Functions\LexicalVariableNode $variable )

Parameters

$variable
public
# prependLexicalVariable( Pharborist\Functions\LexicalVariableNode $variable )

Parameters

$variable
public
# insertLexicalVariable( Pharborist\Functions\LexicalVariableNode $variable, integer $index )

Insert argument before argument at index.

Insert argument before argument at index.

Parameters

$variable
The lexical variable to insert.
$index
Position to insert argument at.

Returns


$this

Throws

OutOfBoundsException
Index out of bounds.
public
# clearLexicalVariables( )
public Pharborist\StatementBlockNode
# getBody( )

Returns

Pharborist\StatementBlockNode
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\Functions\ParameterTrait
appendParameter(), clearParameters(), getOptionalParameters(), getParameter(), getParameterAtIndex(), getParameterByName(), getParameterList(), getParameterNames(), getParameters(), getRequiredParameters(), hasOptionalParameter(), hasParameter(), hasRequiredParameter(), hasRequiredParameters(), insertParameter(), isVariadic(), prependParameter()
Pharborist API documentation generated by ApiGen