mediatekformation

MagicGet extends MagicMethodGenerator
in package

Magic `__get` for method interceptor value holder objects

Table of Contents

FLAG_ABSTRACT  = 0x1
FLAG_FINAL  = 0x2
FLAG_INTERFACE  = 0x8
FLAG_PRIVATE  = 0x40
FLAG_PROTECTED  = 0x20
FLAG_PUBLIC  = 0x10
FLAG_STATIC  = 0x4
LINE_FEED  = "\n"
Line feed to use in place of EOL
VISIBILITY_PRIVATE  = 'private'
VISIBILITY_PROTECTED  = 'protected'
VISIBILITY_PUBLIC  = 'public'
$body  : string
$docBlock  : DocBlockGenerator|null
$flags  : int
$indentation  : int|string
$isSourceDirty  : bool
$name  : string
$parameters  : array<string|int, ParameterGenerator>
$sourceContent  : string
$returnsReference  : bool
$returnType  : null|TypeGenerator
__construct()  : mixed
Constructor
__toString()  : mixed
addFlag()  : AbstractMemberGenerator
copyMethodSignature()  : MethodGenerator
Returns a MethodGenerator based on a MethodReflection with only the signature copied.
fromArray()  : MethodGenerator
Generate from array
fromReflection()  : MethodGenerator
fromReflectionWithoutBodyAndDocBlock()  : static
generate()  : string
getBody()  : string
getDocBlock()  : DocBlockGenerator|null
getIndentation()  : string
getName()  : string
getParameters()  : array<string|int, ParameterGenerator>
getReturnType()  : TypeGenerator|null
getSourceContent()  : string
getVisibility()  : string
isAbstract()  : bool
isFinal()  : bool
isInterface()  : bool
isSourceDirty()  : bool
isStatic()  : bool
removeDocBlock()  : void
removeFlag()  : AbstractMemberGenerator
setAbstract()  : AbstractMemberGenerator
setBody()  : MethodGenerator
setDocBlock()  : AbstractMemberGenerator
setFinal()  : AbstractMemberGenerator
setFlags()  : AbstractMemberGenerator
setIndentation()  : AbstractGenerator
setInterface()  : AbstractMemberGenerator
setName()  : AbstractMemberGenerator
setOptions()  : AbstractGenerator
setParameter()  : MethodGenerator
setParameters()  : MethodGenerator
setReturnsReference()  : MethodGenerator
setReturnType()  : MethodGenerator
setSourceContent()  : AbstractGenerator
setSourceDirty()  : AbstractGenerator
setStatic()  : AbstractMemberGenerator
setVisibility()  : AbstractMemberGenerator
clearBodyIndention()  : string
Identify the space indention from the first line and remove this indention from all lines
expandLiteralType()  : string
extractReturnTypeFromMethodReflection()  : null|string

Constants

Properties

Methods

__construct()

Constructor

public __construct(ReflectionClass $originalClass, PropertyGenerator $valueHolder, PropertyGenerator $prefixInterceptors, PropertyGenerator $suffixInterceptors, PublicPropertiesMap $publicProperties) : mixed
Parameters
$originalClass : ReflectionClass
$valueHolder : PropertyGenerator
$prefixInterceptors : PropertyGenerator
$suffixInterceptors : PropertyGenerator
$publicProperties : PublicPropertiesMap
Tags
throws
InvalidArgumentException
Return values
mixed

copyMethodSignature()

Returns a MethodGenerator based on a MethodReflection with only the signature copied.

public static copyMethodSignature(MethodReflection $reflectionMethod) : MethodGenerator

This is similar to fromReflection() but without the method body and phpdoc as this is quite heavy to copy. It's for example useful when creating proxies where you normally change the method body anyway.

Parameters
$reflectionMethod : MethodReflection
Return values
MethodGenerator

fromArray()

Generate from array

public static fromArray(array<string|int, mixed> $array) : MethodGenerator
Parameters
$array : array<string|int, mixed>
Tags
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

throws
InvalidArgumentException
Return values
MethodGenerator

getSourceContent()

public getSourceContent() : string
Return values
string

clearBodyIndention()

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

protected static clearBodyIndention(string $body) : string
Parameters
$body : string
Return values
string

expandLiteralType()

private static expandLiteralType(string $literalReturnType, ReflectionMethod $methodReflection) : string
Parameters
$literalReturnType : string
$methodReflection : ReflectionMethod
Return values
string

Search results