PHP Class Nette\PhpGenerator\PhpFile

Generates: - opening tag (
Inheritance: use trait Nette\SmartObject
Show file Open project: nette/php-generator Class Usage Examples

Public Methods

Method Description
__toString ( ) : string
addClass ( $name ) : ClassType
addComment ( $val ) : self
addDocument ( $s )
addInterface ( $name ) : ClassType
addNamespace ( $name ) : PhpNamespace
addTrait ( $name ) : ClassType
getComment ( ) : string | null
getDocuments ( )
setComment ( $val ) : self
setDocuments ( array $s )

Method Details

__toString() public method

public __toString ( ) : string
return string PHP code

addClass() public method

public addClass ( $name ) : ClassType
return ClassType

addComment() public method

public addComment ( $val ) : self
return self

addDocument() public method

Deprecation:
public addDocument ( $s )

addInterface() public method

public addInterface ( $name ) : ClassType
return ClassType

addNamespace() public method

public addNamespace ( $name ) : PhpNamespace
return PhpNamespace

addTrait() public method

public addTrait ( $name ) : ClassType
return ClassType

getComment() public method

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

getDocuments() public method

Deprecation:
public getDocuments ( )

setComment() public method

public setComment ( $val ) : self
return self

setDocuments() public method

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