protected function provideResponder(): ResponderInterface
    {
        $acceptHeader = $this->request->getServerParam('HTTP_ACCEPT', '');
        if (strpos($acceptHeader, 'application/json') !== false) {
            return new JsonResponder($this->config);
        }
        return new HtmlResponder($this->config);
    }
protected function provideResponder(): ResponderInterface
    {
        $acceptHeader = $this->request->getServerParam('HTTP_ACCEPT', '');
        if (strpos($acceptHeader, 'application/json') !== false) {
            return new JsonResponder($this->config);
        }
        return new HtmlResponder($this->config);
    }
protected function provideResponder ( ) : ResponderInterface { $ acceptHeader = $ this -> request -> getServerParam ( 'HTTP_ACCEPT' , '' ) ; if ( strpos ( $ acceptHeader , 'application/json' ) !== false ) { return new JsonResponder ( $ this -> config ) ; } return new HtmlResponder ( $ this -> config ) ; }
Provides a responder according to requested content type.

@return ResponderInterface
Provides a responder according to requested content type .