1 | <?php |
||
10 | class UpdatesRepository implements Contracts\RepositoryContract |
||
11 | { |
||
12 | /** |
||
13 | * Update Model instance. |
||
14 | * |
||
15 | * @var mixed |
||
16 | **/ |
||
17 | public $updates; |
||
18 | |||
19 | /** |
||
20 | * Create a new instance of the UpdatesManager::class. |
||
21 | **/ |
||
22 | public function __construct(Update $update) |
||
26 | |||
27 | /** |
||
28 | * Return all the available releses. |
||
29 | * |
||
30 | * @return mixed Illuminate\Support\Collection |
||
31 | **/ |
||
32 | public function releases() |
||
33 | { |
||
34 | return $this->updates->all(); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Get a specific update version. |
||
39 | * |
||
40 | * @return object Elimuswift\Core\Update instance |
||
41 | * |
||
42 | * @param string $version Build version |
||
43 | **/ |
||
44 | public function getRelease($version) |
||
48 | |||
49 | /** |
||
50 | * Get releases later than the provided $version. |
||
51 | * |
||
52 | * @return object Illuminate\Support\Collection |
||
53 | * |
||
54 | * @param string $version Version to compare |
||
55 | **/ |
||
56 | public function laterThan($version) |
||
57 | { |
||
58 | return $this->updates->where('version', '>', $version)->get(); |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * Get the latest update version. |
||
63 | * |
||
64 | * @return object Elimuswift\Core\Update instance |
||
65 | **/ |
||
66 | public function latest() |
||
70 | |||
71 | /** |
||
72 | * Get config properties. |
||
73 | * |
||
74 | * @return mixed |
||
75 | **/ |
||
76 | public function config($property) |
||
83 | } |
||
84 |