1 | <?php |
||
32 | class AchieveSubscriber implements |
||
33 | SubscriberInterface, |
||
34 | Arrayable, |
||
35 | Jsonable |
||
36 | { |
||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $achievements = [ |
||
41 | Karma10Achieve::class, |
||
42 | Karma50Achieve::class, |
||
43 | Karma100Achieve::class, |
||
44 | Karma500Achieve::class, |
||
45 | Thanks20Achieve::class, |
||
46 | Thanks50Achieve::class, |
||
47 | Thanks100Achieve::class, |
||
48 | Thanks10Karma0Achieve::class, |
||
49 | DocsAchieve::class, |
||
50 | ]; |
||
51 | |||
52 | /** |
||
53 | * @var array |
||
54 | */ |
||
55 | protected $instances = []; |
||
56 | |||
57 | /** |
||
58 | * AchieveSubscriber constructor. |
||
59 | */ |
||
60 | public function __construct() |
||
67 | |||
68 | /** |
||
69 | * Subscribe achievements |
||
70 | */ |
||
71 | public function handle() |
||
86 | |||
87 | /** |
||
88 | * @param int $options |
||
89 | * @return string |
||
90 | */ |
||
91 | public function toJson($options = 0): string |
||
95 | |||
96 | /** |
||
97 | * @return array |
||
98 | */ |
||
99 | public function toArray(): array |
||
105 | |||
106 | /** |
||
107 | * @return Collection |
||
108 | */ |
||
109 | public function toCollection(): Collection |
||
113 | |||
114 | /** |
||
115 | * @return array |
||
116 | */ |
||
117 | public function getAchievementInstances(): array |
||
121 | } |
||
122 |