PHP Класс Pop\Code\Generator\NamespaceGenerator

Автор: Nick Sagona, III ([email protected])
Наследование: implements Pop\Code\Generator\GeneratorInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$docblock DocblockGenerator Docblock generator object
$indent string Namespace indent
$namespace string Namespace
$output string Namespace output
$use array Array of namespaces to use

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный метод

Instantiate the property generator object
public __construct ( string $namespace ) : NamespaceGenerator
$namespace string
Результат NamespaceGenerator

__toString() публичный метод

Print namespace
public __toString ( ) : string
Результат string

factory() публичный статический метод

Static method to instantiate the property generator object and return itself to facilitate chaining methods together.
public static factory ( string $namespace ) : NamespaceGenerator
$namespace string
Результат NamespaceGenerator

getNamespace() публичный метод

Get the namespace
public getNamespace ( ) : string
Результат string

render() публичный метод

Render property
public render ( boolean $ret = false ) : mixed
$ret boolean
Результат mixed

setNamespace() публичный метод

Set the namespace
public setNamespace ( string $namespace ) : NamespaceGenerator
$namespace string
Результат NamespaceGenerator

setUse() публичный метод

Set a namespace to use
public setUse ( string $use, string $as = null ) : NamespaceGenerator
$use string
$as string
Результат NamespaceGenerator

setUses() публичный метод

Set namespaces to use
public setUses ( array $uses ) : NamespaceGenerator
$uses array
Результат NamespaceGenerator

Описание свойств

$docblock защищенное свойство

Docblock generator object
protected DocblockGenerator,Pop\Code\Generator $docblock
Результат DocblockGenerator

$indent защищенное свойство

Namespace indent
protected string $indent
Результат string

$namespace защищенное свойство

Namespace
protected string $namespace
Результат string

$output защищенное свойство

Namespace output
protected string $output
Результат string

$use защищенное свойство

Array of namespaces to use
protected array $use
Результат array