Method |
Description |
|
__construct ( string $name = null ) |
Creates a new struct |
|
addRequiredFile ( string $file ) |
Adds a new required file |
|
addUseStatement ( string $qualifiedName, null | string $alias = null ) |
Adds a use statement with an optional alias |
|
clearMethods ( ) |
Clears all methods |
|
clearUseStatements ( ) |
Clears all use statements |
|
create ( string $name = null ) : static |
Creates a new struct |
|
declareUse ( string $qualifiedName, null | string $alias = null ) : string |
Declares a "use $fullClassName" with " as $alias" if $alias is available,
and returns its alias (or not qualified classname) to be used in your actual
php code. |
|
declareUses ( ) |
Declares multiple use statements at once. |
|
generateDocblock ( ) |
Generates a docblock from provided information |
|
getMethod ( string $nameOrMethod ) : PhpMethod |
Returns a method |
|
getMethodNames ( ) : phootwork\collection\Set |
Returns all method names |
|
getMethods ( ) : phootwork\collection\Map |
Returns all methods |
|
getRequiredFiles ( ) : phootwork\collection\Set |
Returns required files |
|
getUseAlias ( string $qualifiedName ) : string |
Returns the usable alias for a qualified name |
|
getUseStatements ( ) : phootwork\collection\Map |
Returns all use statements |
|
hasMethod ( string | PhpMethod $nameOrMethod ) : boolean |
Checks whether a method exists or not |
|
hasUseStatement ( string $qualifiedName ) : boolean |
Returns whether the given use statement is present |
|
removeMethod ( string | PhpMethod $nameOrMethod ) |
Removes a method |
|
removeUseStatement ( string $qualifiedName ) |
Removes a use statement |
|
setMethod ( PhpMethod $method ) |
Adds a method |
|
setMethods ( array $methods ) |
Sets a collection of methods |
|
setRequiredFiles ( array $files ) |
Sets requried files |
|
setUseStatements ( array $useStatements ) |
Sets use statements |
|