Overview

Namespaces

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

Classes

  • NameNode
  • NamespaceNode
  • UseDeclarationBlockNode
  • UseDeclarationNode
  • UseDeclarationStatementNode

Traits

  • IdentifierNameTrait
  • Overview
  • Namespace
  • Class

Class UseDeclarationStatementNode

Use declaration statement, importing several classes, functions, or constants into a namespace.

Example:

use Jones, Gilliam, Cleese as Idle;
Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\ParentNode implements Pharborist\ParentNodeInterface
Extended by Pharborist\StatementNode
Extended by Pharborist\Namespaces\UseDeclarationStatementNode
Namespace: Pharborist\Namespaces
Located at Namespaces/UseDeclarationStatementNode.php
Methods summary
public boolean
# importsClass( string|null $class_name = NULL )

Test whether use declaration imports a class.

Test whether use declaration imports a class.

Parameters

$class_name
(Optional) Class name to check if being imported by use statement.

Returns

boolean
TRUE if this use declaration imports class.
public boolean
# importsFunction( string|null $function_name = NULL )

Test whether use declaration imports a function.

Test whether use declaration imports a function.

Parameters

$function_name
(Optional) Function name to check if being imported by use statement.

Returns

boolean
TRUE if this use declaration imports function.
public boolean
# importsConst( string|null $const_name = NULL )

Test whether use declaration imports a constant.

Test whether use declaration imports a constant.

Parameters

$const_name
(Optional) Constant name to check if being imported by use statement.

Returns

boolean
TRUE if this use declaration imports constant.
public Pharborist\CommaListNode
# getDeclarationList( )

Returns

Pharborist\CommaListNode
public Pharborist\NodeCollection|Pharborist\Namespaces\UseDeclarationNode[]
# getDeclarations( )

Returns

Pharborist\NodeCollection|Pharborist\Namespaces\UseDeclarationNode[]
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