PHP Class Pop\Code\Generator\PropertyGenerator

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 Property indent
$name string Property name
$output string Property output
$static boolean Property static flag
$type string Property type
$value mixed Property value
$visibility string Property visibility

Méthodes publiques

Méthode Description
__construct ( string $name, string $type, mixed $value = null, string $visibility = 'public' ) : PropertyGenerator Constructor
__toString ( ) : string Print property
factory ( string $name, string $type, mixed $value = null, string $visibility = 'public' ) : PropertyGenerator Static method to instantiate the property generator object and return itself to facilitate chaining methods together.
getDesc ( ) : string Get the property description
getDocblock ( ) : DocblockGenerator Access the docblock generator object
getIndent ( ) : string Get the property indent
getName ( ) : string Get the property name
getType ( ) : string Get the property type
getValue ( ) : mixed Get the property value
getVisibility ( ) : string Get the property visibility
isStatic ( ) : boolean Get the property static flag
render ( boolean $ret = false ) : mixed Render property
setDesc ( string $desc = null ) : PropertyGenerator Set the property description
setDocblock ( DocblockGenerator $docblock ) : PropertyGenerator Set the docblock generator object
setIndent ( string $indent = null ) : PropertyGenerator Set the property indent
setName ( string $name ) : PropertyGenerator Set the property name
setStatic ( boolean $static = false ) : PropertyGenerator Set the property static flag
setType ( string $type ) : PropertyGenerator Set the property type
setValue ( mixed $value = null ) : PropertyGenerator Set the property value
setVisibility ( string $visibility = 'public' ) : PropertyGenerator Set the property visibility

Méthodes protégées

Méthode Description
formatArrayValues ( ) : string Format array value

Method Details

__construct() public méthode

Instantiate the property generator object
public __construct ( string $name, string $type, mixed $value = null, string $visibility = 'public' ) : PropertyGenerator
$name string
$type string
$value mixed
$visibility string
Résultat PropertyGenerator

__toString() public méthode

Print property
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 $name, string $type, mixed $value = null, string $visibility = 'public' ) : PropertyGenerator
$name string
$type string
$value mixed
$visibility string
Résultat PropertyGenerator

formatArrayValues() protected méthode

Format array value
protected formatArrayValues ( ) : string
Résultat string

getDesc() public méthode

Get the property description
public getDesc ( ) : string
Résultat string

getDocblock() public méthode

Access the docblock generator object
public getDocblock ( ) : DocblockGenerator
Résultat DocblockGenerator

getIndent() public méthode

Get the property indent
public getIndent ( ) : string
Résultat string

getName() public méthode

Get the property name
public getName ( ) : string
Résultat string

getType() public méthode

Get the property type
public getType ( ) : string
Résultat string

getValue() public méthode

Get the property value
public getValue ( ) : mixed
Résultat mixed

getVisibility() public méthode

Get the property visibility
public getVisibility ( ) : string
Résultat string

isStatic() public méthode

Get the property static flag
public isStatic ( ) : boolean
Résultat boolean

render() public méthode

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

setDesc() public méthode

Set the property description
public setDesc ( string $desc = null ) : PropertyGenerator
$desc string
Résultat PropertyGenerator

setDocblock() public méthode

Set the docblock generator object
public setDocblock ( DocblockGenerator $docblock ) : PropertyGenerator
$docblock DocblockGenerator
Résultat PropertyGenerator

setIndent() public méthode

Set the property indent
public setIndent ( string $indent = null ) : PropertyGenerator
$indent string
Résultat PropertyGenerator

setName() public méthode

Set the property name
public setName ( string $name ) : PropertyGenerator
$name string
Résultat PropertyGenerator

setStatic() public méthode

Set the property static flag
public setStatic ( boolean $static = false ) : PropertyGenerator
$static boolean
Résultat PropertyGenerator

setType() public méthode

Set the property type
public setType ( string $type ) : PropertyGenerator
$type string
Résultat PropertyGenerator

setValue() public méthode

Set the property value
public setValue ( mixed $value = null ) : PropertyGenerator
$value mixed
Résultat PropertyGenerator

setVisibility() public méthode

Set the property visibility
public setVisibility ( string $visibility = 'public' ) : PropertyGenerator
$visibility string
Résultat PropertyGenerator

Property Details

$docblock protected_oe property

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

$indent protected_oe property

Property indent
protected string $indent
Résultat string

$name protected_oe property

Property name
protected string $name
Résultat string

$output protected_oe property

Property output
protected string $output
Résultat string

$static protected_oe property

Property static flag
protected bool $static
Résultat boolean

$type protected_oe property

Property type
protected string $type
Résultat string

$value protected_oe property

Property value
protected mixed $value
Résultat mixed

$visibility protected_oe property

Property visibility
protected string $visibility
Résultat string