1 | <?php |
||
36 | abstract class AbstractPlugin implements PluginInterface |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The appliation instance. |
||
41 | * |
||
42 | * @var \TechDivision\Import\ApplicationInterface |
||
43 | */ |
||
44 | protected $application; |
||
45 | |||
46 | /** |
||
47 | * The plugin configuration instance. |
||
48 | * |
||
49 | * @var \TechDivision\Import\Configuration\PluginConfigurationInterface |
||
50 | */ |
||
51 | protected $pluginConfiguration; |
||
52 | |||
53 | /** |
||
54 | * Initializes the plugin with the application instance. |
||
55 | * |
||
56 | * @param \TechDivision\Import\ApplicationInterface $application The application instance |
||
57 | */ |
||
58 | 3 | public function __construct(ApplicationInterface $application) |
|
62 | |||
63 | /** |
||
64 | * Set's the plugin configuration instance. |
||
65 | * |
||
66 | * @param \TechDivision\Import\Configuration\PluginConfigurationInterface $pluginConfiguration The plugin configuration instance |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | 3 | public function setPluginConfiguration(PluginConfigurationInterface $pluginConfiguration) |
|
74 | |||
75 | /** |
||
76 | * Return's the plugin configuration instance. |
||
77 | * |
||
78 | * @return \TechDivision\Import\Configuration\PluginConfigurationInterface The plugin configuration instance |
||
79 | */ |
||
80 | 3 | public function getPluginConfiguration() |
|
84 | |||
85 | /** |
||
86 | * Return's the application instance. |
||
87 | * |
||
88 | * @return \TechDivision\Import\ApplicationInterface The application instance |
||
89 | */ |
||
90 | 3 | protected function getApplication() |
|
94 | |||
95 | /** |
||
96 | * Return's the RegistryProcessor instance to handle the running threads. |
||
97 | * |
||
98 | * @return \TechDivision\Import\Services\RegistryProcessor The registry processor instance |
||
99 | */ |
||
100 | 3 | protected function getRegistryProcessor() |
|
104 | |||
105 | /** |
||
106 | * Return's the import processor instance. |
||
107 | * |
||
108 | * @return \TechDivision\Import\Services\ImportProcessorInterface The import processor instance |
||
109 | */ |
||
110 | protected function getImportProcessor() |
||
114 | |||
115 | /** |
||
116 | * Return's the unique serial for this import process. |
||
117 | * |
||
118 | * @return string The unique serial |
||
119 | */ |
||
120 | 2 | public function getSerial() |
|
124 | |||
125 | /** |
||
126 | * Return's the logger with the passed name, by default the system logger. |
||
127 | * |
||
128 | * @param string $name The name of the requested system logger |
||
129 | * |
||
130 | * @return \Psr\Log\LoggerInterface The logger instance |
||
131 | * @throws \Exception Is thrown, if the requested logger is NOT available |
||
132 | */ |
||
133 | 1 | protected function getSystemLogger($name = LoggerKeys::SYSTEM) |
|
137 | |||
138 | /** |
||
139 | * Query whether or not the system logger with the passed name is available. |
||
140 | * |
||
141 | * @param string $name The name of the requested system logger |
||
142 | * |
||
143 | * @return boolean TRUE if the logger with the passed name exists, else FALSE |
||
144 | */ |
||
145 | protected function hasSystemLogger($name = LoggerKeys::SYSTEM) |
||
149 | |||
150 | /** |
||
151 | * Return's the array with the system logger instances. |
||
152 | * |
||
153 | * @return array The logger instance |
||
154 | */ |
||
155 | protected function getSystemLoggers() |
||
159 | |||
160 | /** |
||
161 | * Persist the UUID of the actual import process to the PID file. |
||
162 | * |
||
163 | * @return void |
||
164 | * @throws \Exception Is thrown, if the PID can not be added |
||
165 | */ |
||
166 | protected function lock() |
||
170 | |||
171 | /** |
||
172 | * Remove's the UUID of the actual import process from the PID file. |
||
173 | * |
||
174 | * @return void |
||
175 | * @throws \Exception Is thrown, if the PID can not be removed |
||
176 | */ |
||
177 | protected function unlock() |
||
181 | |||
182 | /** |
||
183 | * Remove's the passed line from the file with the passed name. |
||
184 | * |
||
185 | * @param string $line The line to be removed |
||
186 | * @param string $filename The name of the file the line has to be removed |
||
187 | * |
||
188 | * @return void |
||
189 | * @throws \Exception Is thrown, if the file doesn't exists, the line is not found or can not be removed |
||
190 | */ |
||
191 | protected function removeLineFromFile($line, $filename) |
||
195 | |||
196 | /** |
||
197 | * Return's the system configuration. |
||
198 | * |
||
199 | * @return \TechDivision\Import\ConfigurationInterface The system configuration |
||
200 | */ |
||
201 | 1 | protected function getConfiguration() |
|
205 | |||
206 | /** |
||
207 | * Return's the PID filename to use. |
||
208 | * |
||
209 | * @return string The PID filename |
||
210 | */ |
||
211 | protected function getPidFilename() |
||
215 | |||
216 | /** |
||
217 | * Return's the source directory that has to be watched for new files. |
||
218 | * |
||
219 | * @return string The source directory |
||
220 | */ |
||
221 | protected function getSourceDir() |
||
222 | { |
||
223 | return $this->getConfiguration()->getSourceDir(); |
||
224 | } |
||
225 | |||
226 | /** |
||
227 | * Removes the passed directory recursively. |
||
228 | * |
||
229 | * @param string $src Name of the directory to remove |
||
230 | * |
||
231 | * @return void |
||
232 | * @throws \Exception Is thrown, if the directory can not be removed |
||
233 | */ |
||
234 | protected function removeDir($src) |
||
260 | |||
261 | /** |
||
262 | * Return's the configured swift mailer instance. |
||
263 | * |
||
264 | * @return \Swift_Mailer|null The mailer instance |
||
265 | */ |
||
266 | protected function getSwiftMailer() |
||
277 | } |
||
278 |
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.