private function handleResponse($response)
    {

        if ($response instanceof View) {
            $content = $response->render();
        } elseif ($response instanceof Response) {
            $content = $response->getContent();
        } elseif ($response instanceof Request) {
            $content = $response->getResponse()->getContent();
        } elseif (is_string($response)) {
            $content = $response;
        } else {
            $content = false;
        }

        return $content;
    }
private function handleResponse($response)
    {

        if ($response instanceof View) {
            $content = $response->render();
        } elseif ($response instanceof Response) {
            $content = $response->getContent();
        } elseif ($response instanceof Request) {
            $content = $response->getResponse()->getContent();
        } elseif (is_string($response)) {
            $content = $response;
        } else {
            $content = false;
        }

        return $content;
    }
private function handleResponse ( $ response ) { if ( $ response instanceof View ) { $ content = $ response -> render ( ) ; } elseif ( $ response instanceof Response ) { $ content = $ response -> getContent ( ) ; } elseif ( $ response instanceof Request ) { $ content = $ response -> getResponse ( ) -> getContent ( ) ; } elseif ( is_string ( $ response ) ) { $ content = $ response ; } else { $ content = false ; } return $ content ; }
Handler the controller returned value

@param ViewExecuteInterface|Response|Request|string $response
@return string|bool
Handler the controller returned value