NoCommandFound Exception
With message:
No Command Found!
Thrown at: /home/immomail/public_html/okapi2/inc/api/controller.php (199)
| Class/Method | File | Line | | api_controller::findCommandName | inc/api/controller.php | 151 |
| 196 | public function findCommandName($route) {
| | 197 | if (!($route instanceOf api_routing_route)) {
| | 198 | throw new api_exception_NoCommandFound();
| | 199 | }
| | 200 |
| | 201 | if (isset($route['namespace'])) {
| | 202 | $route['namespace'] = api_helpers_string::clean($route['namespace']);
| | 203 | } else {
| | 204 | $route['namespace'] = API_NAMESPACE;
| | 205 | }
|
|
| api_controller::loadController | | |
| 149 | public function loadController(sfEvent $event) {
| | 150 | $commandName = $this->findCommandName($this->route);
| | 151 | $command = $this->sc->$commandName;
| | 152 | $event->setReturnValue(array(
| | 153 | array(
| | 154 | $this,
| | 155 | 'processCommand'
| | 156 | ),
| | 157 | array($command)
|
|
| call_user_func | inc/api/vendor/sfEvent/sfEventDispatcher.php | 96 |
| sfEventDispatcher::notifyUntil | inc/api/vendor/sfRequestHandler/sfRequestHandler.php | 50 |
| 91 | public function notifyUntil(sfEvent $event)
| | 92 | {
| | 93 | foreach ($this->getListeners($event->getName()) as $listener)
| | 94 | {
| | 95 | if (call_user_func($listener, $event))
| | 96 | {
| | 97 | $event->setProcessed(true);
| | 98 | break;
| | 99 | }
| | 100 | }
| | 101 |
| | 102 | return $event;
|
|
| sfRequestHandler::handleRaw | inc/api/vendor/sfRequestHandler/sfRequestHandler.php | 25 |
| 41 | // request
| | 42 | $event = $this->dispatcher->notifyUntil(new sfEvent($this, 'application.request', array('request' => $request)));
| | 43 | if ($event->isProcessed())
| | 44 | {
| | 45 | return $this->filterResponse($event->getReturnValue(), 'An "application.request" listener returned a non response object.');
| | 46 | }
| | 47 |
| | 48 | // load controller
| | 49 | $event = $this->dispatcher->notifyUntil(new sfEvent($this, 'application.load_controller', array('request' => $request)));
| | 50 | if (!$event->isProcessed())
| | 51 | {
| | 52 | throw new Exception('Unable to load the controller.');
| | 53 | }
| | 54 |
| | 55 | list($controller, $arguments) = $event->getReturnValue();
| | 56 |
|
|
| sfRequestHandler::handle | inc/api/controller.php | 112 |
| 20 | public function handle($request)
| | 21 | {
| | 22 | try
| | 23 | {
| | 24 | return $this->handleRaw($request);
| | 25 | }
| | 26 | catch (Exception $e)
| | 27 | {
| | 28 | // exception
| | 29 | $event = $this->dispatcher->notifyUntil(new sfEvent($this, 'application.exception', array('request' => $request, 'exception' => $e)));
| | 30 | if ($event->isProcessed())
| | 31 | {
|
|
| api_controller::run | | 13 |
| 103 | $this->dispatcher->connect('application.response', array(
| | 104 | $this->sc->getService($r),
| | 105 | 'response'
| | 106 | ));
| | 107 | }
| | 108 | }
| | 109 |
| | 110 | $handler = $this->sc->sfRequestHandler;
| | 111 | $response = $handler->handle($this->request);
| | 112 | return $response;
| | 113 | }
|
|