public function getRequestFormat($default = 'html')
    {
        if (null === $this->format) {
            $this->format = $this->attributes->get('_format');
        }

        return null === $this->format ? $default : $this->format;
    }
public function getRequestFormat($default = 'html')
    {
        if (null === $this->format) {
            $this->format = $this->attributes->get('_format');
        }

        return null === $this->format ? $default : $this->format;
    }
public function getRequestFormat ( $ default = 'html' ) { if ( null === $ this -> format ) { $ this -> format = $ this -> attributes -> get ( '_format' ) ; } return null === $ this -> format ? $ default : $ this -> format ; }
Gets the request format.

Here is the process to determine the format:

* format defined by the user (with setRequestFormat())
* _format request attribute
* $default

@param string|null $default The default format

@return string|null The request format
Gets the request format .