1 | <?php |
||
8 | class RecSelMeter |
||
9 | { |
||
10 | /** |
||
11 | * Data of current store |
||
12 | * |
||
13 | * @var array $store |
||
14 | */ |
||
15 | protected $store; |
||
16 | |||
17 | /** |
||
18 | * Set of configuration |
||
19 | * |
||
20 | * @var object $config |
||
21 | */ |
||
22 | protected $config; |
||
23 | |||
24 | /** |
||
25 | * Score of current store |
||
26 | * |
||
27 | * @var int $score |
||
28 | */ |
||
29 | protected $score = 0; |
||
30 | |||
31 | /** |
||
32 | * @param string $url URL of the store |
||
33 | */ |
||
34 | 1 | function __construct($url) |
|
41 | |||
42 | /** |
||
43 | * Return object of Config |
||
44 | * |
||
45 | * @return object |
||
46 | */ |
||
47 | public function config() |
||
51 | |||
52 | /** |
||
53 | * Return score of current store |
||
54 | * |
||
55 | * @return int |
||
56 | */ |
||
57 | 1 | public function calculate() |
|
69 | |||
70 | /** |
||
71 | * Calculate amount of item of store sold |
||
72 | * |
||
73 | * @return void |
||
74 | */ |
||
75 | 1 | protected function sold() |
|
83 | |||
84 | /** |
||
85 | * Add the score point based of seller rank |
||
86 | * |
||
87 | * @return void |
||
88 | */ |
||
89 | 1 | protected function rank() |
|
97 | |||
98 | /** |
||
99 | * Add the score point based of amount of seller feedback |
||
100 | * and its feedback percent |
||
101 | * |
||
102 | * @return void |
||
103 | */ |
||
104 | 1 | protected function feedback() |
|
114 | |||
115 | /** |
||
116 | * Add score point based of time from store published time |
||
117 | * and latest bump (sundul) attempt |
||
118 | * |
||
119 | * @return void |
||
120 | */ |
||
121 | 1 | protected function storeActive() |
|
134 | |||
135 | /** |
||
136 | * Add a score based of seller provides COD or no |
||
137 | * |
||
138 | * @return void |
||
139 | */ |
||
140 | 1 | protected function cod() |
|
146 | |||
147 | /** |
||
148 | * Add a score based of seller account age |
||
149 | * |
||
150 | * @return void |
||
151 | */ |
||
152 | 1 | protected function accountAge() |
|
160 | |||
161 | /** |
||
162 | * Add a score based of amount of image seller provides |
||
163 | * |
||
164 | * @return void |
||
165 | */ |
||
166 | 1 | protected function imageCount() |
|
170 | } |
||
171 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.