| 1 | <?php |
||
| 18 | abstract class AbstractResource implements ResourceInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var mixed |
||
| 22 | */ |
||
| 23 | protected $data; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var callable |
||
| 27 | */ |
||
| 28 | protected $transformer; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * ArrayItem constructor. |
||
| 32 | * @param $data |
||
| 33 | * @param callable $transformer |
||
| 34 | */ |
||
| 35 | public function __construct($data, callable $transformer) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @inheritdoc |
||
| 43 | */ |
||
| 44 | abstract public function __invoke(Scope $scope, string $identifier = null, ...$params); |
||
| 45 | } |
||
| 46 |