public function getHTTPPrefer()
    {
        $result = [
            // can be true or false
            'respond-async' => false,
            // Could be set to 'representation' or 'minimal'.
            'return' => null,
            // Used as a timeout, is usually a number.
            'wait' => null,
            // can be 'strict' or 'lenient'.
            'handling' => false,
        ];

        if ($prefer = $this->httpRequest->getHeader('Prefer')) {
            $result = array_merge(
                $result,
                HTTP\parsePrefer($prefer)
            );
        } elseif ('t' == $this->httpRequest->getHeader('Brief')) {
            $result['return'] = 'minimal';
        }

        return $result;
    }
public function getHTTPPrefer()
    {
        $result = [
            // can be true or false
            'respond-async' => false,
            // Could be set to 'representation' or 'minimal'.
            'return' => null,
            // Used as a timeout, is usually a number.
            'wait' => null,
            // can be 'strict' or 'lenient'.
            'handling' => false,
        ];

        if ($prefer = $this->httpRequest->getHeader('Prefer')) {
            $result = array_merge(
                $result,
                HTTP\parsePrefer($prefer)
            );
        } elseif ('t' == $this->httpRequest->getHeader('Brief')) {
            $result['return'] = 'minimal';
        }

        return $result;
    }
public function getHTTPPrefer ( ) { $ result = [ // can be true or false 'respond-async' => false , // Could be set to 'representation' or 'minimal'. 'return' => null , // Used as a timeout, is usually a number. 'wait' => null , // can be 'strict' or 'lenient'. 'handling' => false , ] ; if ( $ prefer = $ this -> httpRequest -> getHeader ( 'Prefer' ) ) { $ result = array_merge ( $ result , HTTP \ parsePrefer ( $ prefer ) ) ; } elseif ( 't' == $ this -> httpRequest -> getHeader ( 'Brief' ) ) { $ result [ 'return' ] = 'minimal' ; } return $ result ; }
Returns the HTTP Prefer header information.

The prefer header is defined in:
http://tools.ietf.org/html/draft-snell-http-prefer-14

This method will return an array with options.

Currently, the following options may be returned:
[
'return-asynch'         => true,
'return-minimal'        => true,
'return-representation' => true,
'wait'                  => 30,
'strict'                => true,
'lenient'               => true,
]

This method also supports the Brief header, and will also return
'return-minimal' if the brief header was set to 't'.

For the boolean options, false will be returned if the headers are not
specified. For the integer options it will be 'null'.

@return array
Returns the HTTP Prefer header information .