Documentation

PropertyGenerator extends AbstractClassElementGenerator
in package
Uses NameTrait, DocblockTrait

Property generator class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.0.0

Table of Contents

Properties

$docblock  : DocblockGenerator|null
Docblock generator object
$indent  : int
Code indent spaces
$name  : string|null
Name
$output  : string|null
Output string
$static  : bool
Static flag
$type  : string|null
Property type
$value  : mixed
Property value
$visibility  : string
Visibility

Methods

__construct()  : mixed
Constructor
__toString()  : string
Print property
getDesc()  : string|null
Get the docblock description
getDocblock()  : DocblockGenerator|null
Access the docblock generator object
getIndent()  : int
Get the indent
getName()  : string|null
Get the name
getOutput()  : string
Get the output
getType()  : string|null
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()  : string
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()  : static
Set the docblock description
setDocblock()  : static
Set the docblock generator object
setIndent()  : AbstractGenerator
Set the indent
setName()  : static
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

$name

Name

protected string|null $name = null

Methods

__construct()

Constructor

public __construct(string $name[, string|null $type = null ][, mixed $value = null ][, string $visibility = 'public' ][, bool $static = false ]) : mixed

Instantiate the property generator object

Parameters
$name : string
$type : string|null = null
$value : mixed = null
$visibility : string = 'public'
$static : bool = false
Tags
throws
Exception

__toString()

Print property

public __toString() : string
Return values
string

getDesc()

Get the docblock description

public getDesc() : string|null
Return values
string|null

getName()

Get the name

public getName() : string|null
Return values
string|null

getType()

Get the property type

public getType() : string|null
Return values
string|null

hasDesc()

Has a docblock description

public hasDesc() : bool
Return values
bool

hasDocblock()

Has docblock generator object

public hasDocblock() : bool
Return values
bool

hasName()

Get the name

public hasName() : bool
Return values
bool

isRendered()

Is rendered (alias to hasOutput())

public isRendered() : bool
Return values
bool

printIndent()

Print the indent

public printIndent() : string
Return values
string

setDesc()

Set the docblock description

public setDesc([string|null $desc = null ]) : static
Parameters
$desc : string|null = null
Return values
static

setName()

Set the name

public setName(string $name) : static
Parameters
$name : string
Return values
static

formatArrayValues()

Format array value

protected formatArrayValues() : string
Return values
string

        
On this page

Search results