CRM_Utils_FakeObject
in package
This is a quick-and-dirty way to define a vaguely-class-ish structure. It's non-performant, abnormal, and not a complete OOP system. Only use for testing/mocking.
$object = new CRM_Utils_FakeObject(array(
'doIt' => function() { print "It!\n"; }
));
$object->doIt();
Table of Contents
Properties
- $array : array<string|int, mixed>
Methods
- __call() : mixed
- __construct() : mixed
Properties
$array
protected
array<string|int, mixed>
$array
Methods
__call()
public
__call(string $name, mixed $arguments) : mixed
Parameters
- $name : string
- $arguments : mixed
Tags
__construct()
public
__construct(array<string|int, mixed> $array) : mixed
Parameters
- $array : array<string|int, mixed>