\Shmock\ClassBuilderMethod

Summary

Methods
Properties
Constants
__construct()
render()
addToBuiltClass()
setStatic()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$accessLevel
$methodName
$argList
$callable
$isStatic
N/A

Properties

$accessLevel

$accessLevel

$methodName

$methodName

$argList

$argList

$callable

$callable

$isStatic

$isStatic

Methods

__construct()

__construct(string $accessLevel, string $methodName, string[] $typeList, callable $callable)

Parameters

string $accessLevel

must be public, protected or private

string $methodName

must be [a-zA-Z_][a-zA-Z_\d]* and unique to the class

string[] $typeList

describes the expected types defined on the method signature

callable $callable

the implementation of the method

render()

render() : string

Returns

string —

the rendered method. Once eval'ing this method, you must call Method->addToBuiltClass($clazz) on the eval'd class to register the implementation.

addToBuiltClass()

addToBuiltClass( $class) : void

Register the underlying behavior of this function on the target class.

Parameters

$class

setStatic()

setStatic( $isStatic) : void

Parameters

$isStatic