original_string: public function invoke(ServerRequestInterface $request, RouteParams $params)
      {
          $callable = $this->callable;
  
          // Controller Actions are lazy loaded so we need to call the factory to get the callable
          if ($this->isControllerAction()) {
              $callable = call_user_func($this->callable);
          }
  
          // Call the target action with any provided params
          if ($this->invoker) {
              return $this->invoker->setRequest($request)->call($callable, $params->toArray());
          } else {
              return call_user_func($callable, $params);
          }
      }
code: public function invoke(ServerRequestInterface $request, RouteParams $params)
      {
          $callable = $this->callable;
  
          // Controller Actions are lazy loaded so we need to call the factory to get the callable
          if ($this->isControllerAction()) {
              $callable = call_user_func($this->callable);
          }
  
          // Call the target action with any provided params
          if ($this->invoker) {
              return $this->invoker->setRequest($request)->call($callable, $params->toArray());
          } else {
              return call_user_func($callable, $params);
          }
      }
code_tokens: public function invoke ( ServerRequestInterface $ request , RouteParams $ params ) { $ callable = $ this -> callable ; // Controller Actions are lazy loaded so we need to call the factory to get the callable if ( $ this -> isControllerAction ( ) ) { $ callable = call_user_func ( $ this -> callable ) ; } // Call the target action with any provided params if ( $ this -> invoker ) { return $ this -> invoker -> setRequest ( $ request ) -> call ( $ callable , $ params -> toArray ( ) ) ; } else { return call_user_func ( $ callable , $ params ) ; } }
docstring: Invoke the action
  
  @param  ServerRequestInterface $request
  @param  RouteParams            $params
  @return mixed
docstring_tokens: Invoke the action