src/ActionRequest.php
public function accepts($type = null)
    {
        if (!isset($type)) {
            return $this->attributes['accepts'];
        }
        return in_array($type, $this->attributes['accepts']);
    }
public function accepts($type = null)
    {
        if (!isset($type)) {
            return $this->attributes['accepts'];
        }
        return in_array($type, $this->attributes['accepts']);
    }
public function accepts ( $ type = null ) { if ( ! isset ( $ type ) ) { return $ this -> attributes [ 'accepts' ] ; } return in_array ( $ type , $ this -> attributes [ 'accepts' ] ) ; }
Whether or not the client accepts the specified type. If the type is
omitted then a list of acceptable types is returned.

@param string $type MIME type.
@return bool|string[] True if client accepts provided type, false otherwise.
List of accepted MIME types if type parameter omitted.
Whether or not the client accepts the specified type . If the type is omitted then a list of acceptable types is returned .