final class PhpNamespace

Namespaced part of a PHP file.

Generates:

  • namespace statement
  • variable amount of use statements
  • one or more class declarations

Methods

__construct(string $name)

No description

setName($name) deprecated

No description

string
getName()

No description

setBracketedSyntax(bool $state = true)

No description

bool
getBracketedSyntax()

No description

addUse(string $name, string $alias = null, string $aliasOut = null)

No description

array
getUses()

No description

string
unresolveName(string $name)

No description

addClass(string $name)

No description

addInterface(string $name)

No description

addTrait(string $name)

No description

array
getClasses()

No description

string
__toString()

No description

Details

at line 47
__construct(string $name)

No description

Parameters

string $name

at line 57
setName($name) deprecated

deprecated

No description

Parameters

$name

at line 65
string getName()

No description

Return Value

string

at line 75
PhpNamespace setBracketedSyntax(bool $state = true)

internal  
 

No description

Parameters

bool $state

Return Value

PhpNamespace

at line 82
bool getBracketedSyntax()

No description

Return Value

bool

at line 92
PhpNamespace addUse(string $name, string $alias = null, string $aliasOut = null)

No description

Parameters

string $name
string $alias
string $aliasOut

Return Value

PhpNamespace

Exceptions

InvalidStateException

at line 126
array getUses()

No description

Return Value

array

at line 132
string unresolveName(string $name)

No description

Parameters

string $name

Return Value

string

at line 157
ClassType addClass(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 168
ClassType addInterface(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 174
ClassType addTrait(string $name)

No description

Parameters

string $name

Return Value

ClassType

at line 183
array getClasses()

No description

Return Value

array

at line 189
string __toString()

No description

Return Value

string

Traits

SmartObject