Property | Type | Description | |
---|---|---|---|
$__decorator | The decorator instance so we can nest presenters. Underscores here to avoid conflicts if a presenter or object has "decorator" as a variable. | ||
$object | mixed | The object injected on Presenter construction. |
Method | Description | |
---|---|---|
__call ( string $method, array $arguments ) : mixed | Pass any uknown methods through to the inject object. | |
__construct ( mixed $object ) | Create the Presenter and store the object we are presenting. | |
__get ( string $var ) : mixed | Pass any unknown variable calls to present{$variable} or fall through to the injected object. | |
__isset ( string $name ) : boolean | Allow ability to run isset() on a variable | |
__unset ( string $name ) | Allow to unset a variable through the presenter | |
getObject ( ) : mixed | Get the object we are wrapping. | |
offsetExists ( $offset ) | * This will be called when isset() is called via array access. | |
offsetGet ( mixed $offset ) : mixed | Add ability to access properties like an array. | |
offsetSet ( mixed $offset, mixed $value ) : void | Set variable or key value using array access. | |
offsetUnset ( mixed $offset ) : void | Unset a variable or key value using array access. | |
setExtendedDecorator ( |
This is so you can extend the decorator and inject it into the presenter at the class level so the new decorator will be used for nested presenters. Method name should be "setDecorator" however like above I want to make conflicts less likely. |
Method | Description | |
---|---|---|
__getDecorator ( ) | Get the decorator, if none exists then use the default. Underscores here to avoid conflicts if a presenter or object needs to use "getDecorator". | |
getPresenterMethodFromVariable ( string $variable ) : string | null | Fetch the 'present' method name for the given variable. |
public __construct ( mixed $object ) | ||
$object | mixed |
protected __getDecorator ( ) |
public offsetExists ( $offset ) | ||
$offset |
public offsetUnset ( mixed $offset ) : void | ||
$offset | mixed | |
return | void |
public static setExtendedDecorator ( |
||
$decorator | ||
return | void |
protected static Decorator,Robbo\Presenter $__decorator | ||
return |
protected mixed $object | ||
return | mixed |