package Default
inherited_from \Zend\Code\Generator\AbstractMemberGenerator

 Methods

__construct()

__construct(string $name = null, array $parameters = array(), integer $flags = self::FLAG_PUBLIC, string $body = null, \Zend\Code\Generator\DocBlockGenerator|string $docBlock = null

Parameters

$name

string

$parameters

array

$flags

integer

$body

string

$docBlock

\Zend\Code\Generator\DocBlockGeneratorstring

__construct()

__construct(array $options = array()
Inherited

Parameters

$options

array

__toString()

__toString() 

addFlag()

addFlag(integer $flag) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$flag

integer

Returns

\Zend\Code\Generator\AbstractMemberGenerator

Generate from array

fromArray(array $array) : \Zend\Code\Generator\MethodGenerator
Static
configkey name string [required] Class Name
configkey docblock string The docblock information
configkey flags int Flags, one of MethodGenerator::FLAG_ABSTRACT MethodGenerator::FLAG_FINAL
configkey parameters string Class which this class is extending
configkey body string
configkey abstract bool
configkey final bool
configkey static bool
configkey visibility string

Parameters

$array

array

Exceptions

\Zend\Code\Generator\Exception\InvalidArgumentException

Returns

\Zend\Code\Generator\MethodGenerator

fromReflection()

fromReflection(\Zend\Code\Reflection\MethodReflection $reflectionMethod) : \Zend\Code\Generator\MethodGenerator
Static

Parameters

$reflectionMethod

\Zend\Code\Reflection\MethodReflection

Returns

\Zend\Code\Generator\MethodGenerator

generate()

generate() : string

Returns

string

getBody()

getBody() : string

Returns

string

getDocBlock()

getDocBlock() : \Zend\Code\Generator\DocBlockGenerator
Inherited

Returns

\Zend\Code\Generator\DocBlockGenerator

getIndentation()

getIndentation() : string
Inherited

Returns

string

getName()

getName() : string
Inherited

Returns

string

getParameters()

getParameters() : array<mixed,\Zend\Code\Generator\ParameterGenerator>

Returns

array<mixed,\Zend\Code\Generator\ParameterGenerator>

getSourceContent()

getSourceContent() : string
Inherited

Returns

string

getVisibility()

getVisibility() : string
Inherited

Returns

string

isAbstract()

isAbstract() : boolean
Inherited

Returns

boolean

isFinal()

isFinal() : boolean
Inherited

Returns

boolean

isSourceDirty()

isSourceDirty() : boolean
Inherited

Returns

boolean

isStatic()

isStatic() : boolean
Inherited

Returns

boolean

removeFlag()

removeFlag(integer $flag) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$flag

integer

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setAbstract()

setAbstract(boolean $isAbstract) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$isAbstract

boolean

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setBody()

setBody(string $body) : \Zend\Code\Generator\MethodGenerator

Parameters

$body

string

Returns

\Zend\Code\Generator\MethodGenerator

setDocBlock()

setDocBlock(\Zend\Code\Generator\DocBlockGenerator|string $docBlock) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$docBlock

\Zend\Code\Generator\DocBlockGeneratorstring

Exceptions

\Zend\Code\Generator\Exception\InvalidArgumentException

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setFinal()

setFinal(boolean $isFinal) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$isFinal

boolean

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setFlags()

setFlags(integer|array $flags) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$flags

integerarray

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setIndentation()

setIndentation(string $indentation) : \Zend\Code\Generator\AbstractGenerator
Inherited

Parameters

$indentation

string

Returns

\Zend\Code\Generator\AbstractGenerator

setName()

setName(string $name) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$name

string

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setOptions()

setOptions(array|\Traversable $options) : \Zend\Code\Generator\AbstractGenerator
Inherited

Parameters

$options

array\Traversable

Exceptions

\Zend\Code\Generator\Exception\InvalidArgumentException

Returns

\Zend\Code\Generator\AbstractGenerator

setParameter()

setParameter(\Zend\Code\Generator\ParameterGenerator|array|string $parameter) : \Zend\Code\Generator\MethodGenerator

Parameters

$parameter

\Zend\Code\Generator\ParameterGeneratorarraystring

Exceptions

\Zend\Code\Generator\Exception\InvalidArgumentException

Returns

\Zend\Code\Generator\MethodGenerator

setParameters()

setParameters(array $parameters) : \Zend\Code\Generator\MethodGenerator

Parameters

$parameters

array

Returns

\Zend\Code\Generator\MethodGenerator

setSourceContent()

setSourceContent(string $sourceContent) : \Zend\Code\Generator\AbstractGenerator
Inherited

Parameters

$sourceContent

string

Returns

\Zend\Code\Generator\AbstractGenerator

setSourceDirty()

setSourceDirty(boolean $isSourceDirty = true) : \Zend\Code\Generator\AbstractGenerator
Inherited

Parameters

$isSourceDirty

boolean

Returns

\Zend\Code\Generator\AbstractGenerator

setStatic()

setStatic(boolean $isStatic) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$isStatic

boolean

Returns

\Zend\Code\Generator\AbstractMemberGenerator

setVisibility()

setVisibility(string $visibility) : \Zend\Code\Generator\AbstractMemberGenerator
Inherited

Parameters

$visibility

string

Returns

\Zend\Code\Generator\AbstractMemberGenerator

Identify the space indention from the first line and remove this indention from all lines

clearBodyIndention(string $body) : string
Static

Parameters

$body

string

Returns

string

 Properties

 

$body

$body : string

Default

null
 

$docBlock

$docBlock : \Zend\Code\Generator\DocBlockGenerator

Default

null
inherited_from \Zend\Code\Generator\AbstractMemberGenerator::docBlock
 

$docBlock

$docBlock : \Zend\Code\Generator\DocBlockGenerator

Default

null
 

$flags

$flags : integer

Default

self::FLAG_PUBLIC
 

4 spaces by default

$indentation : integer | string

Default

' '
 

$isSourceDirty

$isSourceDirty : boolean

Default

true
 

$name

$name : string

Default

null
 

$parameters

$parameters : array<mixed,\Zend\Code\Generator\ParameterGenerator>

Default

array()
 

$sourceContent

$sourceContent : string

Default

null

 Constants

 

FLAG_ABSTRACT

FLAG_ABSTRACT = 1 
 

FLAG_FINAL

FLAG_FINAL = 2 
 

FLAG_PRIVATE

FLAG_PRIVATE = 64 
 

FLAG_PROTECTED

FLAG_PROTECTED = 32 
 

FLAG_PUBLIC

FLAG_PUBLIC = 16 
 

FLAG_STATIC

FLAG_STATIC = 4 
 

Line feed to use in place of EOL

LINE_FEED = "\n" 
 

VISIBILITY_PRIVATE

VISIBILITY_PRIVATE = 'private' 
 

VISIBILITY_PROTECTED

VISIBILITY_PROTECTED = 'protected' 
 

VISIBILITY_PUBLIC

VISIBILITY_PUBLIC = 'public'