1 | <?php |
||
28 | class CallableDir extends RequestPlugin |
||
29 | { |
||
30 | use \Jaxon\Utils\Traits\Translator; |
||
31 | |||
32 | /** |
||
33 | * The callable repository |
||
34 | * |
||
35 | * @var CallableRepository |
||
36 | */ |
||
37 | protected $repository = null; |
||
38 | |||
39 | /** |
||
40 | * True if the Composer autoload is enabled |
||
41 | * |
||
42 | * @var boolean |
||
43 | */ |
||
44 | private $bAutoloadEnabled = true; |
||
45 | |||
46 | /** |
||
47 | * The Composer autoloader |
||
48 | * |
||
49 | * @var Autoloader |
||
50 | */ |
||
51 | private $xAutoloader = null; |
||
52 | |||
53 | /** |
||
54 | * The class constructor |
||
55 | * |
||
56 | * @param CallableRepository $repository |
||
57 | */ |
||
58 | public function __construct(CallableRepository $repository) |
||
62 | |||
63 | /** |
||
64 | * Return the name of this plugin |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getName() |
||
72 | |||
73 | /** |
||
74 | * Use the Composer autoloader |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | public function useComposerAutoloader() |
||
83 | |||
84 | /** |
||
85 | * Disable the autoloader in the library |
||
86 | * |
||
87 | * The user shall provide an alternative autoload system. |
||
88 | * |
||
89 | * @return void |
||
90 | */ |
||
91 | public function disableAutoload() |
||
96 | |||
97 | /** |
||
98 | * Register a callable class |
||
99 | * |
||
100 | * @param string $sType The type of request handler being registered |
||
101 | * @param string $sDirectory The name of the class being registered |
||
102 | * @param array|string $aOptions The associated options |
||
103 | * |
||
104 | * @return boolean |
||
105 | */ |
||
106 | public function register($sType, $sDirectory, $aOptions) |
||
177 | |||
178 | /** |
||
179 | * Generate a hash for the registered callable objects |
||
180 | * |
||
181 | * @return string |
||
182 | */ |
||
183 | public function generateHash() |
||
187 | |||
188 | /** |
||
189 | * Generate client side javascript code for the registered callable objects |
||
190 | * |
||
191 | * @return string |
||
192 | */ |
||
193 | public function getScript() |
||
197 | |||
198 | /** |
||
199 | * Check if this plugin can process the incoming Jaxon request |
||
200 | * |
||
201 | * @return boolean |
||
202 | */ |
||
203 | public function canProcessRequest() |
||
207 | |||
208 | /** |
||
209 | * Process the incoming Jaxon request |
||
210 | * |
||
211 | * @return boolean |
||
212 | */ |
||
213 | public function processRequest() |
||
217 | } |
||
218 |