| 1 | <?php |
||
| 8 | abstract class Repository |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Language data source. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $datasource; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Class constructor. |
||
| 19 | * |
||
| 20 | * @param string $datasource |
||
| 21 | */ |
||
| 22 | public function __construct($datasource) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Get language collection. |
||
| 29 | * |
||
| 30 | * @return \Illuminate\Support\Collection |
||
| 31 | */ |
||
| 32 | public function collect(): Collection |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Read the datasource. |
||
| 48 | * |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | abstract protected function read(); |
||
| 52 | } |
||
| 53 |