protected function getWriterOptions(RequestInterface $request)
    {
        $options = new WriterOptions();
        $options->setContentType($request->getHeader('Accept'));
        $options->setFormat($request->getUri()->getParameter('format'));
        $options->setSupportedWriter($this->supportedWriter);
        $options->setWriterCallback(function(WriterInterface $writer) use ($request){
            if ($writer instanceof Writer\Jsonp) {
                if (!$writer->getCallbackName()) {
                    $writer->setCallbackName($request->getUri()->getParameter('callback'));
                }
            }
        });

        return $options;
    }
protected function getWriterOptions(RequestInterface $request)
    {
        $options = new WriterOptions();
        $options->setContentType($request->getHeader('Accept'));
        $options->setFormat($request->getUri()->getParameter('format'));
        $options->setSupportedWriter($this->supportedWriter);
        $options->setWriterCallback(function(WriterInterface $writer) use ($request){
            if ($writer instanceof Writer\Jsonp) {
                if (!$writer->getCallbackName()) {
                    $writer->setCallbackName($request->getUri()->getParameter('callback'));
                }
            }
        });

        return $options;
    }
protected function getWriterOptions ( RequestInterface $ request ) { $ options = new WriterOptions ( ) ; $ options -> setContentType ( $ request -> getHeader ( 'Accept' ) ) ; $ options -> setFormat ( $ request -> getUri ( ) -> getParameter ( 'format' ) ) ; $ options -> setSupportedWriter ( $ this -> supportedWriter ) ; $ options -> setWriterCallback ( function ( WriterInterface $ writer ) use ( $ request ) { if ( $ writer instanceof Writer \ Jsonp ) { if ( ! $ writer -> getCallbackName ( ) ) { $ writer -> setCallbackName ( $ request -> getUri ( ) -> getParameter ( 'callback' ) ) ; } } } ) ; return $ options ; }
Returns the writer options for the provided request and the current
context of the controller

@param \PSX\Http\RequestInterface $request
@return \PSX\Framework\Http\WriterOptions
Returns the writer options for the provided request and the current context of the controller