PropertyGenerator
extends AbstractClassElementGenerator
in package
Uses
NameTrait, DocblockTrait
Property generator class
Tags
Table of Contents
- $docblock : DocblockGenerator
- Docblock generator object
- $indent : int
- Code indent spaces
- $name : string
- Name
- $output : string
- Output string
- $static : bool
- Static flag
- $type : string
- Property type
- $value : mixed
- Property value
- $visibility : string
- Visibility
- __construct() : mixed
- Constructor
- __toString() : string
- Print property
- getDesc() : string
- Get the docblock description
- getDocblock() : DocblockGenerator
- Access the docblock generator object
- getIndent() : int
- Get the indent
- getName() : string
- Get the name
- getOutput() : string
- Get the output
- getType() : string
- Get the property type
- getValue() : mixed
- Get the property value
- getVisibility() : string
- Get the visibility
- hasDesc() : bool
- Has a docblock description
- hasDocblock() : bool
- Has docblock generator object
- hasIndent() : bool
- Has indent
- hasName() : bool
- Get the name
- hasOutput() : bool
- Has output
- hasType() : bool
- Has property type
- hasValue() : bool
- Has property value
- isPrivate() : bool
- Set the visibility to private
- isProtected() : bool
- Set the visibility to protected
- isPublic() : bool
- Is visibility public
- isRendered() : bool
- Is rendered (alias to hasOutput())
- isStatic() : bool
- Get the static flag
- printIndent() : string
- Print the indent
- render() : mixed
- Render property
- setAsPrivate() : AbstractClassElementGenerator
- Set the visibility to public
- setAsProtected() : AbstractClassElementGenerator
- Set the visibility to protected
- setAsPublic() : AbstractClassElementGenerator
- Set the visibility to public
- setAsStatic() : AbstractClassElementGenerator
- Set the static flag
- setDesc() : DocblockTrait
- Set the docblock description
- setDocblock() : DocblockTrait
- Set the docblock generator object
- setIndent() : AbstractGenerator
- Set the indent
- setName() : NameTrait
- Set the name
- setType() : PropertyGenerator
- Set the property type
- setValue() : PropertyGenerator
- Set the property value
- setVisibility() : AbstractClassElementGenerator
- Set the visibility
- formatArrayValues() : string
- Format array value
Properties
$docblock
Docblock generator object
protected
DocblockGenerator
$docblock
= null
$indent
Code indent spaces
protected
int
$indent
= 4
$name
Name
protected
string
$name
= null
$output
Output string
protected
string
$output
= null
$static
Static flag
protected
bool
$static
= false
$type
Property type
protected
string
$type
= null
$value
Property value
protected
mixed
$value
= null
$visibility
Visibility
protected
string
$visibility
= 'public'
Methods
__construct()
Constructor
public
__construct(string $name[, string $type = null ][, mixed $value = null ][, string $visibility = 'public' ][, bool $static = false ]) : mixed
Instantiate the property generator object
Parameters
- $name : string
- $type : string = null
- $value : mixed = null
- $visibility : string = 'public'
- $static : bool = false
Return values
mixed —__toString()
Print property
public
__toString() : string
Return values
string —getDesc()
Get the docblock description
public
getDesc() : string
Return values
string —getDocblock()
Access the docblock generator object
public
getDocblock() : DocblockGenerator
Return values
DocblockGenerator —getIndent()
Get the indent
public
getIndent() : int
Return values
int —getName()
Get the name
public
getName() : string
Return values
string —getOutput()
Get the output
public
getOutput() : string
Return values
string —getType()
Get the property type
public
getType() : string
Return values
string —getValue()
Get the property value
public
getValue() : mixed
Return values
mixed —getVisibility()
Get the visibility
public
getVisibility() : string
Return values
string —hasDesc()
Has a docblock description
public
hasDesc() : bool
Return values
bool —hasDocblock()
Has docblock generator object
public
hasDocblock() : bool
Return values
bool —hasIndent()
Has indent
public
hasIndent() : bool
Return values
bool —hasName()
Get the name
public
hasName() : bool
Return values
bool —hasOutput()
Has output
public
hasOutput() : bool
Return values
bool —hasType()
Has property type
public
hasType() : bool
Return values
bool —hasValue()
Has property value
public
hasValue() : bool
Return values
bool —isPrivate()
Set the visibility to private
public
isPrivate() : bool
Return values
bool —isProtected()
Set the visibility to protected
public
isProtected() : bool
Return values
bool —isPublic()
Is visibility public
public
isPublic() : bool
Return values
bool —isRendered()
Is rendered (alias to hasOutput())
public
isRendered() : bool
Return values
bool —isStatic()
Get the static flag
public
isStatic() : bool
Return values
bool —printIndent()
Print the indent
public
printIndent() : string
Return values
string —render()
Render property
public
render() : mixed
Return values
mixed —setAsPrivate()
Set the visibility to public
public
setAsPrivate() : AbstractClassElementGenerator
Return values
AbstractClassElementGenerator —setAsProtected()
Set the visibility to protected
public
setAsProtected() : AbstractClassElementGenerator
Return values
AbstractClassElementGenerator —setAsPublic()
Set the visibility to public
public
setAsPublic() : AbstractClassElementGenerator
Return values
AbstractClassElementGenerator —setAsStatic()
Set the static flag
public
setAsStatic([bool $static = true ]) : AbstractClassElementGenerator
Parameters
- $static : bool = true
Return values
AbstractClassElementGenerator —setDesc()
Set the docblock description
public
setDesc([string $desc = null ]) : DocblockTrait
Parameters
- $desc : string = null
Return values
DocblockTrait —setDocblock()
Set the docblock generator object
public
setDocblock(DocblockGenerator $docblock) : DocblockTrait
Parameters
- $docblock : DocblockGenerator
Return values
DocblockTrait —setIndent()
Set the indent
public
setIndent(string $indent) : AbstractGenerator
Parameters
- $indent : string
Return values
AbstractGenerator —setName()
Set the name
public
setName(string $name) : NameTrait
Parameters
- $name : string
Return values
NameTrait —setType()
Set the property type
public
setType(string $type) : PropertyGenerator
Parameters
- $type : string
Return values
PropertyGenerator —setValue()
Set the property value
public
setValue([mixed $value = null ]) : PropertyGenerator
Parameters
- $value : mixed = null
Return values
PropertyGenerator —setVisibility()
Set the visibility
public
setVisibility([string $visibility = 'public' ]) : AbstractClassElementGenerator
Parameters
- $visibility : string = 'public'
Return values
AbstractClassElementGenerator —formatArrayValues()
Format array value
protected
formatArrayValues() : string