class PhpFile extends Object

Instance of PHP file.

Generates:

  • opening tag (<?php)
  • doc comments
  • one or more namespaces

Methods

setComment($val)

No description

string|null
getComment()

No description

addComment($val)

No description

setDocuments(array $documents)

No description

string[]
getDocuments()

No description

addDocument($document)

No description

addClass($name)

No description

addInterface($name)

No description

addTrait($name)

No description

addNamespace($name)

No description

string
__toString()

No description

Details

at line 35
PhpFile setComment($val)

No description

Parameters

$val

Return Value

PhpFile

at line 45
string|null getComment()

No description

Return Value

string|null

at line 55
PhpFile addComment($val)

No description

Parameters

$val

Return Value

PhpFile

at line 65
PhpFile setDocuments(array $documents)

No description

Parameters

array $documents

Return Value

PhpFile

at line 75
string[] getDocuments()

No description

Return Value

string[]

at line 85
PhpFile addDocument($document)

No description

Parameters

$document

Return Value

PhpFile

at line 96
ClassType addClass($name)

No description

Parameters

$name

Return Value

ClassType

at line 108
ClassType addInterface($name)

No description

Parameters

$name

Return Value

ClassType

at line 120
ClassType addTrait($name)

No description

Parameters

$name

Return Value

ClassType

at line 132
PhpNamespace addNamespace($name)

No description

Parameters

$name

Return Value

PhpNamespace

at line 144
string __toString()

No description

Return Value

string

PHP code