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