PHP Class Nette\PhpGenerator\PhpNamespace

Generates: - namespace statement - variable amount of use statements - one or more class declarations
Inheritance: extends Nette\Object
ファイルを表示 Open project: nette/php-generator Class Usage Examples

Public Methods

Method Description
__construct ( $name = NULL )
__toString ( ) : string
addClass ( $name ) : ClassType
addInterface ( $name ) : ClassType
addTrait ( $name ) : ClassType
addUse ( $name, $alias = NULL, &$aliasOut = NULL ) : self
getBracketedSyntax ( ) : boolean
getClasses ( ) : ClassType[]
getName ( ) : string | null
getUses ( ) : string[]
setBracketedSyntax ( $state = TRUE ) : self
setName ( $name )
unresolveName ( $name ) : string

Method Details

__construct() public method

public __construct ( $name = NULL )

__toString() public method

public __toString ( ) : string
return string PHP code

addClass() public method

public addClass ( $name ) : ClassType
return ClassType

addInterface() public method

public addInterface ( $name ) : ClassType
return ClassType

addTrait() public method

public addTrait ( $name ) : ClassType
return ClassType

addUse() public method

public addUse ( $name, $alias = NULL, &$aliasOut = NULL ) : self
return self

getBracketedSyntax() public method

public getBracketedSyntax ( ) : boolean
return boolean

getClasses() public method

public getClasses ( ) : ClassType[]
return ClassType[]

getName() public method

public getName ( ) : string | null
return string | null

getUses() public method

public getUses ( ) : string[]
return string[]

setBracketedSyntax() public method

public setBracketedSyntax ( $state = TRUE ) : self
return self

setName() public method

Deprecation:
public setName ( $name )

unresolveName() public method

public unresolveName ( $name ) : string
return string