Documentation

AbstractClassGenerator extends AbstractGenerator
in package
Uses NameTrait, NamespaceTrait, DocblockTrait

AbstractYes

Abstract class 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

$constants  : array<string|int, mixed>
Array of constant generator objects
$docblock  : DocblockGenerator|null
Docblock generator object
$indent  : int
Code indent spaces
$methods  : array<string|int, mixed>
Array of method generator objects
$name  : string|null
Name
$namespace  : NamespaceGenerator|null
Namespace generator object
$output  : string|null
Output string

Methods

addConstant()  : AbstractClassGenerator
Add a constant
addConstants()  : AbstractClassGenerator
Add constants
addMethod()  : AbstractClassGenerator
Add a method
addMethods()  : AbstractClassGenerator
Add methods
getConstant()  : ConstantGenerator|null
Get a constant
getConstants()  : array<string|int, mixed>
Get all constants
getDesc()  : string|null
Get the docblock description
getDocblock()  : DocblockGenerator|null
Access the docblock generator object
getIndent()  : int
Get the indent
getMethod()  : MethodGenerator|null
Get a method
getMethods()  : array<string|int, mixed>
Get all methods
getName()  : string|null
Get the name
getNamespace()  : NamespaceGenerator|null
Access the namespace generator object
getOutput()  : string
Get the output
hasConstant()  : bool
Has a constant
hasConstants()  : bool
Has constants
hasDesc()  : bool
Has a docblock description
hasDocblock()  : bool
Has docblock generator object
hasIndent()  : bool
Has indent
hasMethod()  : bool
Has a method
hasMethods()  : bool
Has methods
hasName()  : bool
Get the name
hasNamespace()  : bool
Has a namespace generator object
hasOutput()  : bool
Has output
isRendered()  : bool
Is rendered (alias to hasOutput())
printIndent()  : string
Print the indent
removeConstant()  : AbstractClassGenerator
Remove a constant
removeMethod()  : AbstractClassGenerator
Remove a method
render()  : string
Render method
setDesc()  : static
Set the docblock description
setDocblock()  : static
Set the docblock generator object
setIndent()  : AbstractGenerator
Set the indent
setName()  : static
Set the name
setNamespace()  : static
Set the namespace generator object

Properties

$constants

Array of constant generator objects

protected array<string|int, mixed> $constants = []

$name

Name

protected string|null $name = null

Methods

getConstants()

Get all constants

public getConstants() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDesc()

Get the docblock description

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

getMethods()

Get all methods

public getMethods() : array<string|int, mixed>
Return values
array<string|int, mixed>

getName()

Get the name

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

hasConstant()

Has a constant

public hasConstant(mixed $constant) : bool
Parameters
$constant : mixed
Return values
bool

hasDesc()

Has a docblock description

public hasDesc() : bool
Return values
bool

hasDocblock()

Has docblock generator object

public hasDocblock() : bool
Return values
bool

hasMethod()

Has a method

public hasMethod(mixed $method) : bool
Parameters
$method : mixed
Return values
bool

hasName()

Get the name

public hasName() : bool
Return values
bool

hasNamespace()

Has a namespace generator object

public hasNamespace() : 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

render()

Render method

public abstract render() : 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

        
On this page

Search results