PHP Class Pop\Code\Generator\NamespaceGenerator

Author: Nick Sagona, III ([email protected])
Inheritance: implements Pop\Code\Generator\GeneratorInterface
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$docblock DocblockGenerator Docblock generator object
$indent string Namespace indent
$namespace string Namespace
$output string Namespace output
$use array Array of namespaces to use

Méthodes publiques

Méthode Description
__construct ( string $namespace ) : NamespaceGenerator Constructor
__toString ( ) : string Print namespace
factory ( string $namespace ) : NamespaceGenerator Static method to instantiate the property generator object and return itself to facilitate chaining methods together.
getNamespace ( ) : string Get the namespace
render ( boolean $ret = false ) : mixed Render property
setNamespace ( string $namespace ) : NamespaceGenerator Set the namespace
setUse ( string $use, string $as = null ) : NamespaceGenerator Set a namespace to use
setUses ( array $uses ) : NamespaceGenerator Set namespaces to use

Method Details

__construct() public méthode

Instantiate the property generator object
public __construct ( string $namespace ) : NamespaceGenerator
$namespace string
Résultat NamespaceGenerator

__toString() public méthode

Print namespace
public __toString ( ) : string
Résultat string

factory() public static méthode

Static method to instantiate the property generator object and return itself to facilitate chaining methods together.
public static factory ( string $namespace ) : NamespaceGenerator
$namespace string
Résultat NamespaceGenerator

getNamespace() public méthode

Get the namespace
public getNamespace ( ) : string
Résultat string

render() public méthode

Render property
public render ( boolean $ret = false ) : mixed
$ret boolean
Résultat mixed

setNamespace() public méthode

Set the namespace
public setNamespace ( string $namespace ) : NamespaceGenerator
$namespace string
Résultat NamespaceGenerator

setUse() public méthode

Set a namespace to use
public setUse ( string $use, string $as = null ) : NamespaceGenerator
$use string
$as string
Résultat NamespaceGenerator

setUses() public méthode

Set namespaces to use
public setUses ( array $uses ) : NamespaceGenerator
$uses array
Résultat NamespaceGenerator

Property Details

$docblock protected_oe property

Docblock generator object
protected DocblockGenerator,Pop\Code\Generator $docblock
Résultat DocblockGenerator

$indent protected_oe property

Namespace indent
protected string $indent
Résultat string

$namespace protected_oe property

Namespace
protected string $namespace
Résultat string

$output protected_oe property

Namespace output
protected string $output
Résultat string

$use protected_oe property

Array of namespaces to use
protected array $use
Résultat array