Back to JsonApiView class

Method queryEncode

protected string
queryEncode
(mixed $query)
Encode square brackets in the URI query, according to JSON API specification.
Parameters
  • string $query The URI query
Returns
  • string
Since
  • 4.0.0
Class: JsonApiView
Project: Joomla

Method queryEncode - Source code

/**
 * Encode square brackets in the URI query, according to JSON API specification.
 *
 * @param   string  $query  The URI query
 *
 * @return  string
 *
 * @since   4.0.0
 */
protected function queryEncode($query)
{
    return str_replace(array('[', ']'), array('%5B', '%5D'), $query);
}