original_string: protected function dispatchRequest(\Slim\Http\Request $request, \Slim\Http\Response $response)
      {
          try {
              $this->applyHook('slim.before');
              ob_start();
              $this->applyHook('slim.before.router');
              $dispatched = false;
              $matchedRoutes = $this['router']->getMatchedRoutes($request->getMethod(), $request->getPathInfo(), false);
              foreach ($matchedRoutes as $route) {
                  try {
                      $this->applyHook('slim.before.dispatch');
                      $dispatched = $route->dispatch();
                      $this->applyHook('slim.after.dispatch');
                      if ($dispatched) {
                          break;
                      }
                  } catch (\Slim\Exception\Pass $e) {
                      continue;
                  }
              }
              if (!$dispatched) {
                  $this->notFound();
              }
              $this->applyHook('slim.after.router');
          } catch (\Slim\Exception\Stop $e) {}
          $response->write(ob_get_clean());
          $this->applyHook('slim.after');
      }
code: protected function dispatchRequest(\Slim\Http\Request $request, \Slim\Http\Response $response)
      {
          try {
              $this->applyHook('slim.before');
              ob_start();
              $this->applyHook('slim.before.router');
              $dispatched = false;
              $matchedRoutes = $this['router']->getMatchedRoutes($request->getMethod(), $request->getPathInfo(), false);
              foreach ($matchedRoutes as $route) {
                  try {
                      $this->applyHook('slim.before.dispatch');
                      $dispatched = $route->dispatch();
                      $this->applyHook('slim.after.dispatch');
                      if ($dispatched) {
                          break;
                      }
                  } catch (\Slim\Exception\Pass $e) {
                      continue;
                  }
              }
              if (!$dispatched) {
                  $this->notFound();
              }
              $this->applyHook('slim.after.router');
          } catch (\Slim\Exception\Stop $e) {}
          $response->write(ob_get_clean());
          $this->applyHook('slim.after');
      }
code_tokens: protected function dispatchRequest ( \ Slim \ Http \ Request $ request , \ Slim \ Http \ Response $ response ) { try { $ this -> applyHook ( 'slim.before' ) ; ob_start ( ) ; $ this -> applyHook ( 'slim.before.router' ) ; $ dispatched = false ; $ matchedRoutes = $ this [ 'router' ] -> getMatchedRoutes ( $ request -> getMethod ( ) , $ request -> getPathInfo ( ) , false ) ; foreach ( $ matchedRoutes as $ route ) { try { $ this -> applyHook ( 'slim.before.dispatch' ) ; $ dispatched = $ route -> dispatch ( ) ; $ this -> applyHook ( 'slim.after.dispatch' ) ; if ( $ dispatched ) { break ; } } catch ( \ Slim \ Exception \ Pass $ e ) { continue ; } } if ( ! $ dispatched ) { $ this -> notFound ( ) ; } $ this -> applyHook ( 'slim.after.router' ) ; } catch ( \ Slim \ Exception \ Stop $ e ) { } $ response -> write ( ob_get_clean ( ) ) ; $ this -> applyHook ( 'slim.after' ) ; }
docstring: Dispatch request and build response
  
  This method will route the provided Request object against all available
  application routes. The provided response will reflect the status, header, and body
  set by the invoked matching route.
  
  The provided Request and Response objects are updated by reference. There is no
  value returned by this method.
  
  @param  \Slim\Http\Request  The request instance
  @param  \Slim\Http\Response The response instance
docstring_tokens: Dispatch request and build response