Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
45 | public function onDispatch(Event $Event) |
||
46 | { |
||
47 | $service = $Event->getData('service'); |
||
48 | $request = $service->getRequest(); |
||
49 | |||
50 | if ($request->is('options')) { |
||
51 | $action = new DummyAction([ |
||
52 | 'name' => 'options', |
||
53 | 'service' => $service, |
||
54 | 'route' => null, |
||
55 | 'Extension' => [ |
||
56 | 'CakeDC/Api.Cors' |
||
57 | ] |
||
58 | ]); |
||
59 | $action->Auth->allow('options'); |
||
60 | $result = $service->getResult(); |
||
61 | $result->getData($action->process()); |
||
62 | |||
63 | return $result; |
||
64 | } |
||
65 | } |
||
66 | } |
||
67 |