public function format($default = 'html')
    {
        foreach ($this->getAcceptableContentTypes() as $type) {
            if ($format = $this->getFormat($type)) {
                return $format;
            }
        }

        return $default;
    }
public function format($default = 'html')
    {
        foreach ($this->getAcceptableContentTypes() as $type) {
            if ($format = $this->getFormat($type)) {
                return $format;
            }
        }

        return $default;
    }
public function format ( $ default = 'html' ) { foreach ( $ this -> getAcceptableContentTypes ( ) as $ type ) { if ( $ format = $ this -> getFormat ( $ type ) ) { return $ format ; } } return $ default ; }
Get the data format expected in the response.

@param  string  $default
@return string
Get the data format expected in the response .