Method |
Description |
|
addTrait ( PhpTrait | string $trait ) |
Adds a trait. |
|
addUseStatement ( string $qualifiedName, null | string $alias = null ) |
Adds a use statement with an optional alias |
|
getNamespace ( ) : string |
Returns the namespace |
|
getTraits ( ) : string[] |
Returns a collection of traits |
|
hasTrait ( PhpTrait | string $trait ) : boolean |
Checks whether a trait exists |
|
removeTrait ( PhpTrait | string $trait ) |
Removes a trait. |
|
removeUseStatement ( string $qualifiedName ) |
Removes a use statement |
|
setTraits ( array $traits ) |
Sets a collection of traits |
|