| 1 | <?php |
||
| 22 | class ClosureRenderer implements RowRendererInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var Closure |
||
| 26 | */ |
||
| 27 | protected $closure; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $required_columns; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param Closure $closure |
||
| 36 | */ |
||
| 37 | 6 | public function __construct(Closure $closure) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Magic callable. |
||
| 45 | * |
||
| 46 | * @param string $method |
||
| 47 | * @param array $args |
||
| 48 | */ |
||
| 49 | 5 | public function __call($method, $args) |
|
| 55 | |||
| 56 | 5 | public function apply(\ArrayObject $row): void |
|
| 60 | |||
| 61 | /** |
||
| 62 | * Return the list of columns required in order to use this renderer. |
||
| 63 | * |
||
| 64 | * @return array |
||
| 65 | */ |
||
| 66 | 6 | public function getRequiredColumns(): array |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @param array $required_columns |
||
| 73 | */ |
||
| 74 | 2 | public function setRequiredColumns(array $required_columns) |
|
| 78 | } |
||
| 79 |