PHP Class Nette\PhpGenerator\ClassType

Inheritance: extends Nette\Object
Show file Open project: nette/php-generator Class Usage Examples

Public Methods

Method Description
__construct ( $name = '', PhpNamespace $namespace = NULL )
__toString ( ) : string
addComment ( $val ) : self
addConst ( $name, $value ) : self
addDocument ( $s )
addExtend ( $type ) : self
addImplement ( $type ) : self
addMethod ( $name ) : Method
addProperty ( $name, $value = NULL ) : Property
addTrait ( $trait ) : self
from ( $from ) : self
getComment ( ) : string | null
getConsts ( ) : array
getDocuments ( )
getExtends ( ) : string | string[]
getImplements ( ) : string[]
getMethod ( $name ) : Method
getMethods ( ) : Method[]
getName ( ) : string
getNamespace ( ) : PhpNamespace | null
getProperties ( ) : Property[]
getProperty ( $name ) : Property
getTraits ( ) : string[]
getType ( ) : string
isAbstract ( ) : boolean
isFinal ( ) : boolean
setAbstract ( $state = TRUE ) : self
setComment ( $val ) : self
setConsts ( array $consts ) : self
setDocuments ( array $s )
setExtends ( $types ) : self
setFinal ( $state = TRUE ) : self
setImplements ( array $types ) : self
setMethods ( array $methods ) : self
setName ( $name ) : self
setProperties ( array $props ) : self
setTraits ( array $traits ) : self
setType ( $type ) : self

Method Details

__construct() public method

public __construct ( $name = '', PhpNamespace $namespace = NULL )
$namespace PhpNamespace

__toString() public method

public __toString ( ) : string
return string PHP code

addComment() public method

public addComment ( $val ) : self
return self

addConst() public method

public addConst ( $name, $value ) : self
return self

addDocument() public method

Deprecation:
public addDocument ( $s )

addExtend() public method

public addExtend ( $type ) : self
return self

addImplement() public method

public addImplement ( $type ) : self
return self

addMethod() public method

public addMethod ( $name ) : Method
return Method

addProperty() public method

public addProperty ( $name, $value = NULL ) : Property
return Property

addTrait() public method

public addTrait ( $trait ) : self
return self

from() public static method

public static from ( $from ) : self
return self

getComment() public method

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

getConsts() public method

public getConsts ( ) : array
return array

getDocuments() public method

Deprecation:
public getDocuments ( )

getExtends() public method

public getExtends ( ) : string | string[]
return string | string[]

getImplements() public method

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

getMethod() public method

public getMethod ( $name ) : Method
return Method

getMethods() public method

public getMethods ( ) : Method[]
return Method[]

getName() public method

public getName ( ) : string
return string

getNamespace() public method

public getNamespace ( ) : PhpNamespace | null
return PhpNamespace | null

getProperties() public method

public getProperties ( ) : Property[]
return Property[]

getProperty() public method

public getProperty ( $name ) : Property
return Property

getTraits() public method

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

getType() public method

public getType ( ) : string
return string

isAbstract() public method

public isAbstract ( ) : boolean
return boolean

isFinal() public method

public isFinal ( ) : boolean
return boolean

setAbstract() public method

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

setComment() public method

public setComment ( $val ) : self
return self

setConsts() public method

public setConsts ( array $consts ) : self
$consts array
return self

setDocuments() public method

Deprecation:
public setDocuments ( array $s )
$s array

setExtends() public method

public setExtends ( $types ) : self
return self

setFinal() public method

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

setImplements() public method

public setImplements ( array $types ) : self
$types array
return self

setMethods() public method

public setMethods ( array $methods ) : self
$methods array
return self

setName() public method

public setName ( $name ) : self
return self

setProperties() public method

public setProperties ( array $props ) : self
$props array
return self

setTraits() public method

public setTraits ( array $traits ) : self
$traits array
return self

setType() public method

public setType ( $type ) : self
return self