Class EmbeddedArrayDecorator
-
Maslosoft\Mangan\Decorators\EmbeddedDecorator
implements
Maslosoft\Mangan\Interfaces\Decorators\Property\DecoratorInterface
-
Maslosoft\Mangan\Decorators\EmbeddedArrayDecorator
implements
Maslosoft\Mangan\Interfaces\Decorators\Property\DecoratorInterface
Methods summary
public
boolean
|
#
read( Maslosoft\Addendum\Interfaces\AnnotatedInterface $model, string $name, mixed & $dbValue, string $transformatorClass = Maslosoft\Mangan\Decorators\TransformatorInterface::class )
This will be called when getting value.
This should return end user value.
This will be called when getting value.
This should return end user value.
Parameters
- $model
- Document model which will be decorated
- $name
- Field name
- $dbValue
- $transformatorClass
- Transformator class used
Returns
boolean Return true if value should be assigned to model
Overrides
Implementation of
|
public
boolean
|
#
write( Maslosoft\Addendum\Interfaces\AnnotatedInterface $model, string $name, mixed[] & $dbValue, string $transformatorClass = Maslosoft\Mangan\Decorators\TransformatorInterface::class )
This will be called when setting value.
This should return db acceptable value
This will be called when setting value.
This should return db acceptable value
Parameters
- $model
- Model which is about to be decorated
- $name
- Current field name
- $dbValue
- $dbValues Whole model values from database. This is associative array with keys same as model properties (use $name param to access value). This is passed by reference.
- $transformatorClass
- Transformator class used
Returns
boolean Return true to store value to database
Overrides
Implementation of
|