| 1 | <?php |
||
| 20 | abstract class AbstractSimpleTransformer |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @param $data |
||
| 24 | * @param string $identifier |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | abstract public function __invoke($data, string $identifier = null); |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array $config |
||
| 31 | */ |
||
| 32 | public function __construct(array $config = []) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param mixed $data |
||
| 39 | * @param callable $transformer |
||
| 40 | * @param array $extra |
||
| 41 | * @return mixed |
||
| 42 | */ |
||
| 43 | protected function item($data, callable $transformer, array $extra = []) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param mixed $data |
||
| 50 | * @param callable $transformer |
||
| 51 | * @param array $extra |
||
| 52 | * @return mixed |
||
| 53 | */ |
||
| 54 | protected function collection($data, $transformer, array $extra = []) |
||
| 58 | } |
||
| 59 |