Class Prototype
Subclasses of the ICanBoogie\Object
class are associated with a prototype, which
can be used to add methods as well as getters and setters to classes.
When using the ICanBoogie framework, methods can be defined using the "hooks" config and the "prototypes" namespace:
<?php return [ 'prototypes' => [ 'Icybee\Modules\Pages\Page::my_additional_method' => 'MyHookClass::my_additional_method', 'Icybee\Modules\Pages\Page::lazy_get_my_property' => 'MyHookClass::lazy_get_my_property' ] ];
- ICanBoogie\Prototype implements ArrayAccess, IteratorAggregate
Methods summary
public static
|
|
public static
|
|
protected
|
|
protected
array[string]callable
|
|
protected
|
|
public
|
|
public
|
|
public
boolean
|
|
public
callable
|
|
public
|
Magic methods summary
Properties summary
protected static
array[string]Prototype
|
$prototypes |
#
Prototypes built per class. |
protected static
array[string]callable
|
$pool |
#
Pool of prototype methods per class. |
protected
string
|
$class |
#
Class associated with the prototype. |
protected
|
$parent |
#
Parent prototype. |
protected
array[string]callable
|
$methods |
#
Methods defined by the prototype. |
protected
array[string]callable
|
$consolidated_methods |
#
Methods defined by the prototypes chain. |