Skip to content

Latest commit

 

History

History
19 lines (18 loc) · 460 Bytes

objectsFunctions.md

File metadata and controls

19 lines (18 loc) · 460 Bytes

Object functions

namespace AlecRabbit\Helpers

callMethod()

Calls private/protected method of object

$result = callMethod($object, 'protectedMethod', $arg1, $arg2);
$result = callMethod(Some::class, 'privateMethod', $arg1, $arg2);
getValue()

Gets value of private/protected property of object

$result = getValue($object, 'protectedProperty');
$result = getValue(Some::class, 'privatedProperty');