| 1 | <?php |
||
| 18 | trait IsArrayable |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Get object as array. |
||
| 22 | * |
||
| 23 | * @return array This object as an array |
||
| 24 | */ |
||
| 25 | public function toArray() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Get internal data array. |
||
| 40 | * |
||
| 41 | * Because collections are immutable, direct access to the underlying data array is discouraged, even from within |
||
| 42 | * the collection class itself. Use $this->getData() instead. |
||
| 43 | |||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | abstract protected function getData(); |
||
| 47 | |||
| 48 | } |