1 | <?php namespace jlourenco\base; |
||
14 | class Base |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * The Settings repository. |
||
19 | * |
||
20 | * @var \jlourenco\base\Repositories\SettingsRepositoryInterface |
||
21 | */ |
||
22 | protected $settings; |
||
23 | |||
24 | /** |
||
25 | * The User repository. |
||
26 | * |
||
27 | * @var \jlourenco\base\Repositories\UserRepositoryInterface |
||
28 | */ |
||
29 | protected $user; |
||
30 | |||
31 | /** |
||
32 | * The Log repository. |
||
33 | * |
||
34 | * @var \jlourenco\base\Repositories\LogRepositoryInterface |
||
35 | */ |
||
36 | protected $logs; |
||
37 | |||
38 | /** |
||
39 | * The Job repository. |
||
40 | * |
||
41 | * @var \jlourenco\base\Repositories\JobsRepositoryInterface |
||
42 | */ |
||
43 | protected $jobs; |
||
44 | |||
45 | /** |
||
46 | * The Visits repository. |
||
47 | * |
||
48 | * @var \jlourenco\base\Repositories\VisitsRepositoryInterface |
||
49 | */ |
||
50 | protected $visits; |
||
51 | |||
52 | /** |
||
53 | * Cached, available methods on the settings repository, used for dynamic calls. |
||
54 | * |
||
55 | * @var array |
||
56 | */ |
||
57 | protected $settingsMethods = []; |
||
58 | |||
59 | /** |
||
60 | * Create a new Base instance. |
||
61 | * |
||
62 | * @param \jlourenco\base\Repositories\SettingsRepositoryInterface $settings |
||
63 | * @param \jlourenco\base\Repositories\UserRepositoryInterface $user |
||
64 | * @param \jlourenco\base\Repositories\LogRepositoryInterface $log |
||
65 | * @param \jlourenco\base\Repositories\VisitsRepositoryInterface $visits |
||
66 | */ |
||
67 | public function __construct(SettingsRepositoryInterface $settings, UserRepositoryInterface $user, LogRepositoryInterface $log, VisitsRepositoryInterface $visits, JobsRepositoryInterface $jobs) |
||
75 | |||
76 | /** |
||
77 | * Returns the settings repository. |
||
78 | *c |
||
79 | * @return \jlourenco\base\Repositories\SettingsRepositoryInterface |
||
80 | */ |
||
81 | public function getSettingsRepository() |
||
85 | |||
86 | /** |
||
87 | * Sets the ettings repository. |
||
88 | * |
||
89 | * @param \jlourenco\base\Repositories\SettingsRepositoryInterface $settings |
||
90 | * @return void |
||
91 | */ |
||
92 | public function setSettingsRepository(SettingsRepositoryInterface $settings) |
||
96 | |||
97 | /** |
||
98 | * Returns the ers repository. |
||
99 | *c |
||
100 | * @return \jlourenco\base\Repositories\UserRepositoryInterface |
||
101 | */ |
||
102 | public function getUsersRepository() |
||
106 | |||
107 | /** |
||
108 | * Sets the ettings repository. |
||
109 | * |
||
110 | * @param \jlourenco\base\Repositories\UserRepositoryInterface $user |
||
111 | * @return void |
||
112 | */ |
||
113 | public function setUsersRepository(UserRepositoryInterface $user) |
||
117 | |||
118 | /** |
||
119 | * Returns the log repository. |
||
120 | *c |
||
121 | * @return \jlourenco\base\Repositories\LogRepositoryInterface |
||
122 | */ |
||
123 | public function getLogsRepository() |
||
127 | |||
128 | /** |
||
129 | * Sets the log repository. |
||
130 | * |
||
131 | * @param \jlourenco\base\Repositories\LogRepositoryInterface $log |
||
132 | * @return void |
||
133 | */ |
||
134 | public function setLogsRepository(LogRepositoryInterface $log) |
||
138 | |||
139 | /** |
||
140 | * Returns the visits repository. |
||
141 | *c |
||
142 | * @return \jlourenco\base\Repositories\VisitsRepositoryInterface |
||
143 | */ |
||
144 | public function getVisitsRepository() |
||
148 | |||
149 | /** |
||
150 | * Sets the visits repository. |
||
151 | * |
||
152 | * @param \jlourenco\base\Repositories\VisitsRepositoryInterface $visits |
||
153 | * @return void |
||
154 | */ |
||
155 | public function setVisitsRepository(VisitsRepositoryInterface $visits) |
||
159 | |||
160 | /** |
||
161 | * Returns the jobs repository. |
||
162 | *c |
||
163 | * @return \jlourenco\base\Repositories\JobsRepositoryInterface |
||
164 | */ |
||
165 | public function getJobsRepository() |
||
169 | |||
170 | /** |
||
171 | * Sets the jobs repository. |
||
172 | * |
||
173 | * @param \jlourenco\base\Repositories\JobsRepositoryInterface $jobs |
||
174 | * @return void |
||
175 | */ |
||
176 | public function setJobsRepository(JobsRepositoryInterface $jobs) |
||
180 | |||
181 | /** |
||
182 | * Returns all accessible methods on the associated settings repository. |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | protected function getSettingsMethods() |
||
198 | |||
199 | /** |
||
200 | * Dynamically pass missing methods to Base. |
||
201 | * |
||
202 | * @param string $method |
||
203 | * @param array $parameters |
||
204 | * @return mixed |
||
205 | * @throws \BadMethodCallException |
||
206 | */ |
||
207 | public function __call($method, $parameters) |
||
219 | |||
220 | /** |
||
221 | * Create a log |
||
222 | * |
||
223 | * @param $logMessage |
||
224 | */ |
||
225 | public function Log($logMessage) |
||
235 | |||
236 | /** |
||
237 | * Create a log and associates it to a user |
||
238 | * |
||
239 | * @param $logMessage |
||
240 | * @param $userTarget |
||
241 | */ |
||
242 | public function TargettedLog($logMessage, $userTarget) |
||
246 | |||
247 | public function RegisterVisit() |
||
261 | |||
262 | public function CompleteVisits() |
||
287 | |||
288 | } |
||
289 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.