Use_
in package
implements
Builder
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- Creates a name use (alias) builder.
- as() : $this
- Sets alias for used name.
- getNode() : Use_
- Returns the built node.
Properties
$alias
protected
string|null
$alias
= null
$name
protected
Name
$name
$type
protected
Use_::TYPE_*
$type
Methods
__construct()
Creates a name use (alias) builder.
public
__construct(Name|string $name, Use_::TYPE_* $type) : mixed
Parameters
- $name : Name|string
-
Name of the entity (namespace, class, function, constant) to alias
- $type : Use_::TYPE_*
-
One of the Stmt\Use_::TYPE_* constants
as()
Sets alias for used name.
public
as(string $alias) : $this
Parameters
- $alias : string
-
Alias to use (last component of full name by default)
Return values
$this —The builder instance (for fluid interface)
getNode()
Returns the built node.
public
getNode() : Use_
Return values
Use_ —The built node