\CodeIgniter\TestReflectionHelper

Testing helper.

Summary

Methods
Properties
Constants
getPrivateMethodInvoker()
setPrivateProperty()
getPrivateProperty()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getAccessibleRefProperty()
No private properties found
N/A

Methods

getPrivateMethodInvoker()

getPrivateMethodInvoker(object|string  $obj, string  $method) : \Closure

Find a private method invoker.

Parameters

object|string $obj

object or class name

string $method

method name

Throws

\ReflectionException

Returns

\Closure

setPrivateProperty()

setPrivateProperty(object|string  $obj, string  $property, mixed  $value) 

Set a private property.

Parameters

object|string $obj

object or class name

string $property

property name

mixed $value

value

Throws

\ReflectionException

getPrivateProperty()

getPrivateProperty(object|string  $obj, string  $property) : mixed

Retrieve a private property.

Parameters

object|string $obj

object or class name

string $property

property name

Throws

\ReflectionException

Returns

mixed —

value

getAccessibleRefProperty()

getAccessibleRefProperty(object  $obj, string  $property) : \ReflectionProperty

Find an accessible property.

Parameters

object $obj
string $property

Throws

\ReflectionException

Returns

\ReflectionProperty