TraitUse
in package
implements
Builder
Interfaces, Classes, Traits and Enums
Table of Contents
- $adaptations : mixed
- $traits : mixed
- __construct() : mixed
- Creates a trait use builder.
- and() : $this
- Adds used trait.
- getNode() : Node
- Returns the built node.
- with() : $this
- Adds trait adaptation.
Properties
$adaptations
protected
mixed
$adaptations
= []
$traits
protected
mixed
$traits
= []
Methods
__construct()
Creates a trait use builder.
public
__construct(Name|string ...$traits) : mixed
Parameters
- $traits : Name|string
-
Names of used traits
Return values
mixed —and()
Adds used trait.
public
and(Name|string $trait) : $this
Parameters
- $trait : Name|string
-
Trait name
Return values
$this —The builder instance (for fluid interface)
getNode()
Returns the built node.
public
getNode() : Node
Return values
Node —The built node
with()
Adds trait adaptation.
public
with(TraitUseAdaptation|TraitUseAdaptation $adaptation) : $this
Parameters
- $adaptation : TraitUseAdaptation|TraitUseAdaptation
-
Trait adaptation
Return values
$this —The builder instance (for fluid interface)