| Total Complexity | 8 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | abstract class Extractor |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var mixed |
||
| 12 | */ |
||
| 13 | protected $document; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $searchTree; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $output = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Extractor constructor. |
||
| 27 | * |
||
| 28 | * @param $document |
||
| 29 | */ |
||
| 30 | public function __construct($document) |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Dynamically choose what methods to call on each Resource. |
||
| 37 | * |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | public function extract(): array |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Get a list of data Types from Schema. |
||
| 64 | * |
||
| 65 | * @return array |
||
| 66 | */ |
||
| 67 | protected function dataTypes(): array |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Prepare each data document. |
||
| 74 | * |
||
| 75 | * @return mixed |
||
| 76 | */ |
||
| 77 | abstract protected function getDataFromDocument(); |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Set the source of the data on the data. |
||
| 81 | */ |
||
| 82 | protected function addOutputSource(): void |
||
| 89 |