protected function parseFields(Resource $resource)
    {
        $fields = $resource->getFields();
        if (!is_array($fields)) {
            $this->sendError(static::ERROR_UNKNOWN_FIELDS, $fields);
        }
        return $fields;
    }
protected function parseFields(Resource $resource)
    {
        $fields = $resource->getFields();
        if (!is_array($fields)) {
            $this->sendError(static::ERROR_UNKNOWN_FIELDS, $fields);
        }
        return $fields;
    }
protected function parseFields ( Resource $ resource ) { $ fields = $ resource -> getFields ( ) ; if ( ! is_array ( $ fields ) ) { $ this -> sendError ( static :: ERROR_UNKNOWN_FIELDS , $ fields ) ; } return $ fields ; }
Parses fields query and validate against a resource

@param Resource $resource Resource

@return string[]

@throws RouterException If fields query parameter has invalid fields
Parses fields query and validate against a resource