src/main/php/routing/ResolvingResource.php
public function resolve(Request $request, Response $response)
    {
        $uriPath = $this->calledUri->path($this->route->configuredPath());
        $target  = $this->route->target();
        if (is_callable($target)) {
            return $target($request, $response, $uriPath);
        }

        if ($target instanceof Target) {
            return $target->resolve($request, $response, $uriPath);
        }

        $targetInstance = $this->injector->getInstance($target);
        if (!($targetInstance instanceof Target)) {
            return $response->internalServerError(
                    'Configured target class ' . $target . ' for route ' . $uriPath
                    . ' is not an instance of ' . Target::class
            );
        }

        return $targetInstance->resolve($request, $response, $uriPath);
    }
public function resolve(Request $request, Response $response)
    {
        $uriPath = $this->calledUri->path($this->route->configuredPath());
        $target  = $this->route->target();
        if (is_callable($target)) {
            return $target($request, $response, $uriPath);
        }

        if ($target instanceof Target) {
            return $target->resolve($request, $response, $uriPath);
        }

        $targetInstance = $this->injector->getInstance($target);
        if (!($targetInstance instanceof Target)) {
            return $response->internalServerError(
                    'Configured target class ' . $target . ' for route ' . $uriPath
                    . ' is not an instance of ' . Target::class
            );
        }

        return $targetInstance->resolve($request, $response, $uriPath);
    }
public function resolve ( Request $ request , Response $ response ) { $ uriPath = $ this -> calledUri -> path ( $ this -> route -> configuredPath ( ) ) ; $ target = $ this -> route -> target ( ) ; if ( is_callable ( $ target ) ) { return $ target ( $ request , $ response , $ uriPath ) ; } if ( $ target instanceof Target ) { return $ target -> resolve ( $ request , $ response , $ uriPath ) ; } $ targetInstance = $ this -> injector -> getInstance ( $ target ) ; if ( ! ( $ targetInstance instanceof Target ) ) { return $ response -> internalServerError ( 'Configured target class ' . $ target . ' for route ' . $ uriPath . ' is not an instance of ' . Target :: class ) ; } return $ targetInstance -> resolve ( $ request , $ response , $ uriPath ) ; }
triggers actual logic on this resource

The logic might be capsuled in a closure, a callback, or a processor
class. The return value from this logic will be used to evaluate whether
post processors are called by the web app. A return value of false means
no post processor will be called, whereas any other or no return value
will result in post processors being called by the webapp.

@param   \stubbles\webapp\Request   $request   current request
@param   \stubbles\webapp\Response  $response  response to send
@return  mixed
triggers actual logic on this resource