|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* ResponseManager.php - Jaxon plugin manager |
|
5
|
|
|
* |
|
6
|
|
|
* Register Jaxon plugins, generate corresponding code, handle request |
|
7
|
|
|
* and redirect them to the right plugin. |
|
8
|
|
|
* |
|
9
|
|
|
* @package jaxon-core |
|
|
|
|
|
|
10
|
|
|
* @author Jared White |
|
|
|
|
|
|
11
|
|
|
* @author J. Max Wilson |
|
|
|
|
|
|
12
|
|
|
* @author Joseph Woolley |
|
|
|
|
|
|
13
|
|
|
* @author Steffen Konerow |
|
|
|
|
|
|
14
|
|
|
* @author Thierry Feuzeu <[email protected]> |
|
15
|
|
|
* @copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson |
|
|
|
|
|
|
16
|
|
|
* @copyright Copyright (c) 2008-2010 by Joseph Woolley, Steffen Konerow, Jared White & J. Max Wilson |
|
|
|
|
|
|
17
|
|
|
* @copyright 2016 Thierry Feuzeu <[email protected]> |
|
18
|
|
|
* @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License |
|
19
|
|
|
* @link https://github.com/jaxon-php/jaxon-core |
|
20
|
|
|
*/ |
|
|
|
|
|
|
21
|
|
|
|
|
22
|
|
|
namespace Jaxon\Plugin\Manager; |
|
23
|
|
|
|
|
24
|
|
|
use Jaxon\Jaxon; |
|
25
|
|
|
use Jaxon\Config\ConfigManager; |
|
26
|
|
|
use Jaxon\Container\Container; |
|
27
|
|
|
use Jaxon\Exception\SetupException; |
|
28
|
|
|
use Jaxon\Plugin\Code\CodeGenerator; |
|
29
|
|
|
use Jaxon\Plugin\Contract\CallableRegistryInterface; |
|
30
|
|
|
use Jaxon\Plugin\Contract\CodeGeneratorInterface; |
|
31
|
|
|
use Jaxon\Plugin\Contract\RequestHandlerInterface; |
|
32
|
|
|
use Jaxon\Plugin\Contract\ResponsePluginInterface; |
|
33
|
|
|
use Jaxon\Plugin\Package; |
|
34
|
|
|
use Jaxon\Plugin\RequestPlugin; |
|
35
|
|
|
use Jaxon\Plugin\ResponsePlugin; |
|
36
|
|
|
use Jaxon\Request\Plugin\CallableClass\CallableClassPlugin; |
|
37
|
|
|
use Jaxon\Request\Plugin\CallableClass\CallableDirPlugin; |
|
38
|
|
|
use Jaxon\Request\Plugin\CallableFunction\CallableFunctionPlugin; |
|
39
|
|
|
use Jaxon\Response\Plugin\DataBag\DataBagPlugin; |
|
40
|
|
|
use Jaxon\Response\Plugin\JQuery\JQueryPlugin; |
|
41
|
|
|
use Jaxon\Response\Response; |
|
42
|
|
|
use Jaxon\Ui\Dialogs\MessageInterface; |
|
43
|
|
|
use Jaxon\Ui\Dialogs\QuestionInterface; |
|
44
|
|
|
use Jaxon\Ui\View\ViewManager; |
|
45
|
|
|
use Jaxon\Utils\Config\Config; |
|
46
|
|
|
use Jaxon\Utils\Translation\Translator; |
|
47
|
|
|
|
|
48
|
|
|
use Closure; |
|
49
|
|
|
|
|
50
|
|
|
use function class_implements; |
|
51
|
|
|
use function in_array; |
|
52
|
|
|
use function is_array; |
|
53
|
|
|
use function is_integer; |
|
54
|
|
|
use function is_string; |
|
55
|
|
|
use function is_subclass_of; |
|
56
|
|
|
use function trim; |
|
57
|
|
|
|
|
58
|
|
|
class PluginManager |
|
|
|
|
|
|
59
|
|
|
{ |
|
60
|
|
|
/** |
|
61
|
|
|
* @var Container |
|
62
|
|
|
*/ |
|
63
|
|
|
protected $di; |
|
|
|
|
|
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @var Translator |
|
67
|
|
|
*/ |
|
68
|
|
|
protected $xTranslator; |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @var ConfigManager |
|
72
|
|
|
*/ |
|
73
|
|
|
protected $xConfigManager; |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @var ViewManager |
|
77
|
|
|
*/ |
|
78
|
|
|
protected $xViewManager; |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* The code generator |
|
82
|
|
|
* |
|
83
|
|
|
* @var CodeGenerator |
|
84
|
|
|
*/ |
|
85
|
|
|
private $xCodeGenerator; |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* Request plugins, indexed by name |
|
89
|
|
|
* |
|
90
|
|
|
* @var array<CallableRegistryInterface> |
|
91
|
|
|
*/ |
|
92
|
|
|
private $aRegistryPlugins = []; |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Request handlers, indexed by name |
|
96
|
|
|
* |
|
97
|
|
|
* @var array<RequestHandlerInterface> |
|
98
|
|
|
*/ |
|
99
|
|
|
private $aRequestHandlers = []; |
|
100
|
|
|
|
|
101
|
|
|
/** |
|
102
|
|
|
* Response plugins, indexed by name |
|
103
|
|
|
* |
|
104
|
|
|
* @var array<ResponsePluginInterface> |
|
105
|
|
|
*/ |
|
106
|
|
|
private $aResponsePlugins = []; |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* The constructor |
|
110
|
|
|
* |
|
111
|
|
|
* @param Container $di |
|
|
|
|
|
|
112
|
|
|
* @param ConfigManager $xConfigManager |
|
|
|
|
|
|
113
|
|
|
* @param ViewManager $xViewManager |
|
|
|
|
|
|
114
|
|
|
* @param CodeGenerator $xCodeGenerator |
|
|
|
|
|
|
115
|
|
|
* @param Translator $xTranslator |
|
|
|
|
|
|
116
|
|
|
*/ |
|
117
|
|
|
public function __construct(Container $di, ConfigManager $xConfigManager, |
|
|
|
|
|
|
118
|
|
|
ViewManager $xViewManager, CodeGenerator $xCodeGenerator, Translator $xTranslator) |
|
119
|
|
|
{ |
|
120
|
|
|
$this->di = $di; |
|
|
|
|
|
|
121
|
|
|
$this->xConfigManager = $xConfigManager; |
|
122
|
|
|
$this->xViewManager = $xViewManager; |
|
|
|
|
|
|
123
|
|
|
$this->xCodeGenerator = $xCodeGenerator; |
|
124
|
|
|
$this->xTranslator = $xTranslator; |
|
|
|
|
|
|
125
|
|
|
} |
|
|
|
|
|
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* Get the request plugins |
|
129
|
|
|
* |
|
130
|
|
|
* @return array<RequestPlugin> |
|
131
|
|
|
*/ |
|
132
|
|
|
public function getRequestHandlers(): array |
|
133
|
|
|
{ |
|
134
|
|
|
return $this->aRequestHandlers; |
|
135
|
|
|
} |
|
|
|
|
|
|
136
|
|
|
|
|
137
|
|
|
/** |
|
138
|
|
|
* Get a package instance |
|
139
|
|
|
* |
|
140
|
|
|
* @param string $sClassName The package class name |
|
|
|
|
|
|
141
|
|
|
* |
|
142
|
|
|
* @return Package|null |
|
143
|
|
|
*/ |
|
144
|
|
|
public function getPackage(string $sClassName): ?Package |
|
145
|
|
|
{ |
|
146
|
|
|
return $this->di->get(trim($sClassName, '\\ ')); |
|
147
|
|
|
} |
|
|
|
|
|
|
148
|
|
|
|
|
149
|
|
|
/** |
|
150
|
|
|
* Register a plugin |
|
151
|
|
|
* |
|
152
|
|
|
* Below is a table for priorities and their description: |
|
153
|
|
|
* - 0 to 999: Plugins that are part of or extensions to the jaxon core |
|
154
|
|
|
* - 1000 to 8999: User created plugins, typically, these plugins don't care about order |
|
155
|
|
|
* - 9000 to 9999: Plugins that generally need to be last or near the end of the plugin list |
|
156
|
|
|
* |
|
157
|
|
|
* @param string $sClassName The plugin class |
|
|
|
|
|
|
158
|
|
|
* @param string $sPluginName The plugin name |
|
|
|
|
|
|
159
|
|
|
* @param integer $nPriority The plugin priority, used to order the plugins |
|
|
|
|
|
|
160
|
|
|
* |
|
161
|
|
|
* @return void |
|
162
|
|
|
* @throws SetupException |
|
163
|
|
|
*/ |
|
164
|
|
|
public function registerPlugin(string $sClassName, string $sPluginName, int $nPriority = 1000) |
|
165
|
|
|
{ |
|
166
|
|
|
$bIsUsed = false; |
|
|
|
|
|
|
167
|
|
|
$aInterfaces = class_implements($sClassName); |
|
168
|
|
|
if(in_array(CodeGeneratorInterface::class, $aInterfaces)) |
|
169
|
|
|
{ |
|
170
|
|
|
$this->xCodeGenerator->addGenerator($sClassName, $nPriority); |
|
171
|
|
|
$bIsUsed = true; |
|
172
|
|
|
} |
|
173
|
|
|
if(in_array(CallableRegistryInterface::class, $aInterfaces)) |
|
174
|
|
|
{ |
|
175
|
|
|
$this->aRegistryPlugins[$sPluginName] = $sClassName; |
|
176
|
|
|
$bIsUsed = true; |
|
|
|
|
|
|
177
|
|
|
} |
|
178
|
|
|
if(in_array(RequestHandlerInterface::class, $aInterfaces)) |
|
179
|
|
|
{ |
|
180
|
|
|
$this->aRequestHandlers[$sPluginName] = $sClassName; |
|
181
|
|
|
$bIsUsed = true; |
|
|
|
|
|
|
182
|
|
|
} |
|
183
|
|
|
if(in_array(ResponsePluginInterface::class, $aInterfaces)) |
|
184
|
|
|
{ |
|
185
|
|
|
$this->aResponsePlugins[$sPluginName] = $sClassName; |
|
186
|
|
|
$bIsUsed = true; |
|
|
|
|
|
|
187
|
|
|
} |
|
188
|
|
|
|
|
189
|
|
|
// This plugin implements the Message interface |
|
190
|
|
|
if(in_array(MessageInterface::class, $aInterfaces)) |
|
191
|
|
|
{ |
|
192
|
|
|
$this->di->getDialog()->setMessage($sClassName); |
|
193
|
|
|
$bIsUsed = true; |
|
194
|
|
|
} |
|
195
|
|
|
// This plugin implements the Question interface |
|
196
|
|
|
if(in_array(QuestionInterface::class, $aInterfaces)) |
|
197
|
|
|
{ |
|
198
|
|
|
$this->di->getDialog()->setQuestion($sClassName); |
|
199
|
|
|
$bIsUsed = true; |
|
200
|
|
|
} |
|
201
|
|
|
|
|
202
|
|
|
if(!$bIsUsed) |
|
203
|
|
|
{ |
|
204
|
|
|
// The class is invalid. |
|
205
|
|
|
$sMessage = $this->xTranslator->trans('errors.register.invalid', ['name' => $sClassName]); |
|
206
|
|
|
throw new SetupException($sMessage); |
|
207
|
|
|
} |
|
208
|
|
|
|
|
209
|
|
|
// Register the plugin in the DI container, if necessary |
|
210
|
|
|
if(!$this->di->has($sClassName)) |
|
211
|
|
|
{ |
|
212
|
|
|
$this->di->auto($sClassName); |
|
213
|
|
|
} |
|
214
|
|
|
} |
|
|
|
|
|
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* Register a function or callable class |
|
218
|
|
|
* |
|
219
|
|
|
* Call the request plugin with the $sType defined as name. |
|
220
|
|
|
* |
|
221
|
|
|
* @param string $sType The type of request handler being registered |
|
|
|
|
|
|
222
|
|
|
* @param string $sCallable The callable entity being registered |
|
|
|
|
|
|
223
|
|
|
* @param array|string $xOptions The associated options |
|
|
|
|
|
|
224
|
|
|
* |
|
225
|
|
|
* @return void |
|
226
|
|
|
* @throws SetupException |
|
227
|
|
|
*/ |
|
228
|
|
|
public function registerCallable(string $sType, string $sCallable, $xOptions = []) |
|
229
|
|
|
{ |
|
230
|
|
|
if(isset($this->aRegistryPlugins[$sType]) && |
|
231
|
|
|
($xPlugin = $this->di->g($this->aRegistryPlugins[$sType]))) |
|
|
|
|
|
|
232
|
|
|
{ |
|
233
|
|
|
$xPlugin->register($sType, $sCallable, $xPlugin->checkOptions($sCallable, $xOptions)); |
|
234
|
|
|
return; |
|
235
|
|
|
} |
|
236
|
|
|
throw new SetupException($this->xTranslator->trans('errors.register.plugin', |
|
237
|
|
|
['name' => $sType, 'callable' => $sCallable])); |
|
238
|
|
|
} |
|
|
|
|
|
|
239
|
|
|
|
|
240
|
|
|
/** |
|
241
|
|
|
* Register callables from a section of the config |
|
242
|
|
|
* |
|
243
|
|
|
* @param array $aOptions The content of the config section |
|
|
|
|
|
|
244
|
|
|
* @param string $sCallableType The type of callable to register |
|
|
|
|
|
|
245
|
|
|
* |
|
246
|
|
|
* @return void |
|
247
|
|
|
* @throws SetupException |
|
248
|
|
|
*/ |
|
249
|
|
|
private function registerCallablesFromOptions(array $aOptions, string $sCallableType) |
|
250
|
|
|
{ |
|
251
|
|
|
foreach($aOptions as $xKey => $xValue) |
|
252
|
|
|
{ |
|
253
|
|
|
if(is_integer($xKey) && is_string($xValue)) |
|
254
|
|
|
{ |
|
255
|
|
|
// Register a function without options |
|
256
|
|
|
$this->registerCallable($sCallableType, $xValue); |
|
257
|
|
|
} |
|
258
|
|
|
elseif(is_string($xKey) && (is_array($xValue) || is_string($xValue))) |
|
259
|
|
|
{ |
|
260
|
|
|
// Register a function with options |
|
261
|
|
|
$this->registerCallable($sCallableType, $xKey, $xValue); |
|
262
|
|
|
} |
|
263
|
|
|
} |
|
264
|
|
|
} |
|
|
|
|
|
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* Save items in the DI container |
|
268
|
|
|
* |
|
269
|
|
|
* @param Config $xConfig |
|
|
|
|
|
|
270
|
|
|
* |
|
271
|
|
|
* @return void |
|
272
|
|
|
*/ |
|
273
|
|
|
private function updateContainer(Config $xConfig) |
|
274
|
|
|
{ |
|
275
|
|
|
$aOptions = $xConfig->getOption('container', []); |
|
276
|
|
|
foreach($aOptions as $xKey => $xValue) |
|
277
|
|
|
{ |
|
278
|
|
|
if(is_integer($xKey) && is_string($xValue)) |
|
279
|
|
|
{ |
|
280
|
|
|
// The value of the entry is the class name |
|
281
|
|
|
$this->di->auto($xValue); |
|
282
|
|
|
} |
|
283
|
|
|
elseif($xValue instanceof Closure) |
|
284
|
|
|
{ |
|
285
|
|
|
// The key is the class name. It must be a string. |
|
286
|
|
|
$this->di->set((string)$xKey, $xValue); |
|
287
|
|
|
} |
|
288
|
|
|
else |
|
289
|
|
|
{ |
|
290
|
|
|
// The key is the class name. It must be a string. |
|
291
|
|
|
$this->di->val((string)$xKey, $xValue); |
|
292
|
|
|
} |
|
293
|
|
|
} |
|
294
|
|
|
} |
|
|
|
|
|
|
295
|
|
|
|
|
296
|
|
|
/** |
|
297
|
|
|
* Read and set Jaxon options from a JSON config file |
|
298
|
|
|
* |
|
299
|
|
|
* @param Config $xConfig The config options |
|
|
|
|
|
|
300
|
|
|
* @param Config|null $xPkgConfig The user provided package options |
|
301
|
|
|
* |
|
302
|
|
|
* @return void |
|
303
|
|
|
* @throws SetupException |
|
304
|
|
|
*/ |
|
305
|
|
|
private function registerItemsFromConfig(Config $xConfig, ?Config $xPkgConfig = null) |
|
306
|
|
|
{ |
|
307
|
|
|
$aSections = [ |
|
308
|
|
|
'functions' => Jaxon::CALLABLE_FUNCTION, |
|
309
|
|
|
'classes' => Jaxon::CALLABLE_CLASS, |
|
310
|
|
|
'directories' => Jaxon::CALLABLE_DIR, |
|
311
|
|
|
]; |
|
312
|
|
|
// Register functions, classes and directories |
|
313
|
|
|
foreach($aSections as $sSection => $sCallableType) |
|
314
|
|
|
{ |
|
315
|
|
|
$this->registerCallablesFromOptions($xConfig->getOption($sSection, []), $sCallableType); |
|
316
|
|
|
} |
|
317
|
|
|
// Register the view namespaces |
|
318
|
|
|
// Note: the $xPkgConfig can provide a "template" option, which is used to customize |
|
319
|
|
|
// the user defined view namespaces. That's why it is needed here. |
|
320
|
|
|
$this->xViewManager->addNamespaces($xConfig, $xPkgConfig); |
|
321
|
|
|
// Save items in the DI container |
|
322
|
|
|
$this->updateContainer($xConfig); |
|
323
|
|
|
} |
|
|
|
|
|
|
324
|
|
|
|
|
325
|
|
|
/** |
|
326
|
|
|
* Get package options |
|
327
|
|
|
* |
|
328
|
|
|
* @param string $sClassName The package class |
|
|
|
|
|
|
329
|
|
|
* |
|
330
|
|
|
* @return array |
|
331
|
|
|
* @throws SetupException |
|
332
|
|
|
*/ |
|
333
|
|
|
private function getPackageOptions(string $sClassName): array |
|
334
|
|
|
{ |
|
335
|
|
|
if(!is_subclass_of($sClassName, Package::class)) |
|
336
|
|
|
{ |
|
337
|
|
|
$sMessage = $this->xTranslator->trans('errors.register.invalid', ['name' => $sClassName]); |
|
338
|
|
|
throw new SetupException($sMessage); |
|
339
|
|
|
} |
|
340
|
|
|
// $this->aPackages contains packages config file paths. |
|
341
|
|
|
$aLibOptions = $sClassName::config(); |
|
342
|
|
|
if(is_string($aLibOptions)) |
|
343
|
|
|
{ |
|
344
|
|
|
$aLibOptions = $this->xConfigManager->read($aLibOptions); |
|
345
|
|
|
} |
|
346
|
|
|
if(!is_array($aLibOptions)) |
|
347
|
|
|
{ |
|
348
|
|
|
$sMessage = $this->xTranslator->trans('errors.register.invalid', ['name' => $sClassName]); |
|
349
|
|
|
throw new SetupException($sMessage); |
|
350
|
|
|
} |
|
351
|
|
|
return $aLibOptions; |
|
352
|
|
|
} |
|
|
|
|
|
|
353
|
|
|
|
|
354
|
|
|
/** |
|
355
|
|
|
* Register a package |
|
356
|
|
|
* |
|
357
|
|
|
* @param string $sClassName The package class |
|
|
|
|
|
|
358
|
|
|
* @param array $aPkgOptions The user provided package options |
|
|
|
|
|
|
359
|
|
|
* |
|
360
|
|
|
* @return void |
|
361
|
|
|
* @throws SetupException |
|
362
|
|
|
*/ |
|
363
|
|
|
public function registerPackage(string $sClassName, array $aPkgOptions) |
|
364
|
|
|
{ |
|
365
|
|
|
$sClassName = trim($sClassName, '\\ '); |
|
366
|
|
|
$aLibOptions = $this->getPackageOptions($sClassName); |
|
367
|
|
|
// Add the package name to the config |
|
368
|
|
|
$aLibOptions['package'] = $sClassName; |
|
369
|
|
|
$xLibConfig = $this->xConfigManager->newConfig($aLibOptions); |
|
|
|
|
|
|
370
|
|
|
$xPkgConfig = $this->xConfigManager->newConfig($aPkgOptions); |
|
|
|
|
|
|
371
|
|
|
$this->di->registerPackage($sClassName, $xPkgConfig); |
|
372
|
|
|
// Register the declarations in the package config. |
|
373
|
|
|
$this->registerItemsFromConfig($xLibConfig, $xPkgConfig); |
|
374
|
|
|
// Register the package as a code generator. |
|
375
|
|
|
$this->xCodeGenerator->addGenerator($sClassName, 500); |
|
376
|
|
|
} |
|
|
|
|
|
|
377
|
|
|
|
|
378
|
|
|
/** |
|
379
|
|
|
* Read and set Jaxon options from a JSON config file |
|
380
|
|
|
* |
|
381
|
|
|
* @param Config $xAppConfig The config options |
|
|
|
|
|
|
382
|
|
|
* |
|
383
|
|
|
* @return void |
|
384
|
|
|
* @throws SetupException |
|
385
|
|
|
*/ |
|
386
|
|
|
public function registerFromConfig(Config $xAppConfig) |
|
387
|
|
|
{ |
|
388
|
|
|
$this->registerItemsFromConfig($xAppConfig); |
|
389
|
|
|
|
|
390
|
|
|
// Register packages |
|
391
|
|
|
$aPackageConfig = $xAppConfig->getOption('packages', []); |
|
392
|
|
|
foreach($aPackageConfig as $sClassName => $aPkgOptions) |
|
393
|
|
|
{ |
|
394
|
|
|
$this->registerPackage($sClassName, $aPkgOptions); |
|
395
|
|
|
} |
|
396
|
|
|
} |
|
|
|
|
|
|
397
|
|
|
|
|
398
|
|
|
/** |
|
399
|
|
|
* Find the specified response plugin by name and return a reference to it if one exists |
|
400
|
|
|
* |
|
401
|
|
|
* @param string $sName The name of the plugin |
|
|
|
|
|
|
402
|
|
|
* @param Response|null $xResponse The response to attach the plugin to |
|
|
|
|
|
|
403
|
|
|
* |
|
404
|
|
|
* @return ResponsePlugin|null |
|
405
|
|
|
*/ |
|
406
|
|
|
public function getResponsePlugin(string $sName, ?Response $xResponse = null): ?ResponsePlugin |
|
407
|
|
|
{ |
|
408
|
|
|
if(!isset($this->aResponsePlugins[$sName])) |
|
409
|
|
|
{ |
|
410
|
|
|
return null; |
|
411
|
|
|
} |
|
412
|
|
|
$xPlugin = $this->di->g($this->aResponsePlugins[$sName]); |
|
|
|
|
|
|
413
|
|
|
if(($xResponse)) |
|
414
|
|
|
{ |
|
415
|
|
|
$xPlugin->setResponse($xResponse); |
|
416
|
|
|
} |
|
417
|
|
|
return $xPlugin; |
|
418
|
|
|
} |
|
|
|
|
|
|
419
|
|
|
|
|
420
|
|
|
/** |
|
421
|
|
|
* Register the Jaxon request plugins |
|
422
|
|
|
* |
|
423
|
|
|
* @return void |
|
424
|
|
|
* @throws SetupException |
|
425
|
|
|
*/ |
|
426
|
|
|
public function registerPlugins() |
|
427
|
|
|
{ |
|
428
|
|
|
// Request plugins |
|
429
|
|
|
$this->registerPlugin(CallableClassPlugin::class, Jaxon::CALLABLE_CLASS, 101); |
|
430
|
|
|
$this->registerPlugin(CallableFunctionPlugin::class, Jaxon::CALLABLE_FUNCTION, 102); |
|
431
|
|
|
$this->registerPlugin(CallableDirPlugin::class, Jaxon::CALLABLE_DIR, 103); |
|
432
|
|
|
|
|
433
|
|
|
// Register the JQuery response plugin |
|
434
|
|
|
$this->registerPlugin(JQueryPlugin::class, JQueryPlugin::NAME, 700); |
|
435
|
|
|
// Register the DataBag response plugin |
|
436
|
|
|
$this->registerPlugin(DataBagPlugin::class, DataBagPlugin::NAME, 700); |
|
437
|
|
|
} |
|
|
|
|
|
|
438
|
|
|
} |
|
439
|
|
|
|