1 | <?php |
||
8 | class Plugin |
||
9 | { |
||
10 | public $name; |
||
11 | public $slug; |
||
12 | public $version; |
||
13 | public $author; |
||
14 | public $author_profile; |
||
15 | public $contributors; |
||
16 | public $requires; |
||
17 | public $tested; |
||
18 | public $requires_php; |
||
19 | public $rating; |
||
20 | public $ratings; |
||
21 | public $num_ratings; |
||
22 | public $support_threads; |
||
23 | public $support_threads_resolved; |
||
24 | public $active_installs; |
||
25 | public $last_updated; |
||
26 | public $added; |
||
27 | public $homepage; |
||
28 | public $download_link; |
||
29 | public $screenshots; |
||
30 | public $tags; |
||
31 | public $versions; |
||
32 | public $donate_link; |
||
33 | public $banners; |
||
34 | |||
35 | /** |
||
36 | * Fill the Model with |
||
37 | * the data from the array. |
||
38 | * |
||
39 | * @param array $data |
||
40 | * |
||
41 | * @return Plugin |
||
42 | */ |
||
43 | 2 | public function fill(array $data): Plugin |
|
54 | |||
55 | /** |
||
56 | * Convert the Model to an array. |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | public function toArray(): array |
||
64 | |||
65 | /** |
||
66 | * Up to Date. |
||
67 | * |
||
68 | * Checks the version of the current plugin vs. the |
||
69 | * version supplied and returns true or false. |
||
70 | * |
||
71 | * If the plugin is greater than or equal to the current version, |
||
72 | * return true, else return false. |
||
73 | * |
||
74 | * @param $version |
||
75 | * @return bool |
||
76 | */ |
||
77 | 1 | public function upToDate($version): bool |
|
85 | } |
||
86 |