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

Trait ArgumentTrait

Trait for nodes that have arguments. For example, function calls.

Direct Known Users

Pharborist\Functions\CallNode, Pharborist\Objects\NewNode

Indirect Known Users

Pharborist\Functions\CallbackCallNode, Pharborist\Functions\DefineNode, Pharborist\Objects\ObjectMethodCallNode, Pharborist\Functions\EmptyNode, Pharborist\Functions\EvalNode, Pharborist\Functions\FunctionCallNode, Pharborist\Functions\HaltCompilerNode, Pharborist\Functions\IssetNode, Pharborist\Functions\ListNode, Pharborist\Functions\UnsetNode, Pharborist\Objects\ClassMethodCallNode
Namespace: Pharborist\Functions
Located at Functions/ArgumentTrait.php
Methods summary
public Pharborist\CommaListNode
# getArgumentList( )

Returns

Pharborist\CommaListNode
public Pharborist\NodeCollection|Pharborist\ExpressionNode[]
# getArguments( )

Returns

Pharborist\NodeCollection|Pharborist\ExpressionNode[]
public
# appendArgument( mixed $argument )

Parameters

$argument

The argument to prepend. Can be an ExpressionNode or a scalar value, which will be converted to an expression.

Returns


$this

Throws

InvalidArgumentException
public
# prependArgument( mixed $argument )

Parameters

$argument

The argument to prepend. Can be an ExpressionNode or a scalar value, which will be converted to an expression.

Returns


$this

Throws

InvalidArgumentException
public
# insertArgument( mixed $argument, integer $index )

Insert argument before argument at index.

Insert argument before argument at index.

Parameters

$argument

The argument to insert. Can be an ExpressionNode or a scalar value, which will be converted to an expression.

$index
Position to insert argument at.

Returns


$this

Throws

OutOfBoundsException
Index out of bounds.
InvalidArgumentException
public
# clearArguments( )

Remove all arguments.

Remove all arguments.

Returns


$this
Pharborist API documentation generated by ApiGen