Method |
Description |
|
__construct ( string | array | self $name, array $attributes = [] ) |
Constructs a name node. |
|
__toString ( ) : string |
Returns a string representation of the name by imploding the namespace parts with the
namespace separator. |
|
concat ( string | array | self | null $name1, string | array | self | null $name2, array $attributes = [] ) : static | null |
Concatenate two names, yielding a new Name instance. |
|
getFirst ( ) : string |
Gets the first part of the name, i.e. everything before the first namespace separator. |
|
getLast ( ) : string |
Gets the last part of the name, i.e. everything after the last namespace separator. |
|
getSubNodeNames ( ) |
|
|
isFullyQualified ( ) : boolean |
Checks whether the name is fully qualified. (E.g. \Name) |
|
isQualified ( ) : boolean |
Checks whether the name is qualified. (E.g. Name\Name) |
|
isRelative ( ) : boolean |
Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) |
|
isUnqualified ( ) : boolean |
Checks whether the name is unqualified. (E.g. Name) |
|
slice ( integer $offset, integer | null $length = null ) : static | null |
Gets a slice of a name (similar to array_slice). |
|
toString ( ) : string |
Returns a string representation of the name by imploding the namespace parts with the
namespace separator. |
|