BeanContext/Decorator.php
\Conjoon_BeanContext_Decorator
A decorator for casting return values of specified model-methods to their applicable objects. If no susbstiute for the specified method to decorate can be found, the method/property of the decorated class will be used.
A ModelDecorator casts abstract storage data to the entities they represent.
- Author
- Thorsten Suckow-Homberg
- Category
- BeanContext
Constants
Properties
Methods

__call(
string $method, array $arguments
)
:
mixedMethod tries to determine if the called method was defined in $_decoratedMethods. If this is the case, the return values will be casted to instances of teh class defined in $_entity.
If the method called was not found in $_decorated, the method will be called on the object this class decorates.
| Name | Type | Description |
|---|---|---|
| $method | string | The method name called |
| $arguments | array | The arguments passed. |
| Type | Description |
|---|---|
| mixed |

__construct(
\Conjoon_BeanContext_Decoratable $mixed, \Conjoon_Filter_Input $filter
=
null, boolean $strict
=
true
)
:
voidConstructor
| Name | Type | Description |
|---|---|---|
| $mixed | \Conjoon_BeanContext_Decoratable | The table class to model, or the classname as a string of the model to decorate. The class will then try to load the class and instantiate it with no arguments. |
| $filter | \Conjoon_Filter_Input | An optional filter that gets processed before the data is returned. The flter will only be used if teh data is decorated as dto or entity |
| $strict | boolean | if set to false, mising setters for any property available will not throw an exception |
| Exception | Description |
|---|---|
| \Exception |