| 1 | <?php |
||
| 9 | trait DecoratorTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Iterate collection and apply decorators based on action. |
||
| 13 | * |
||
| 14 | * @param \Percy\Entity\Collection $collection |
||
| 15 | * @param integer $action |
||
| 16 | * |
||
| 17 | * @return boolean |
||
| 18 | */ |
||
| 19 | 4 | protected function decorate(Collection $collection, $action) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Invoke callable decorator on entity. |
||
| 29 | * |
||
| 30 | * @param array $properties |
||
| 31 | * @param string $decorator |
||
| 32 | * @param \Percy\Entity\EntityInterface $entity |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | protected function invokeDecorators(array $properties, $decorator, EntityInterface $entity) |
||
| 48 | } |
||
| 49 |