Open Journal Systems
3.3.0
|
Public Member Functions | |
__toString () | |
encodeValue ($value) | |
getFieldSeparator () | |
getUrlEncoding () | |
getValueSeparator () | |
isUrlEncoding () | |
setAggregator (QueryAggregatorInterface $aggregator=null) | |
setFieldSeparator ($separator) | |
setValueSeparator ($separator) | |
urlEncode () | |
useUrlEncoding ($encode) | |
![]() | |
__construct (array $data=array()) | |
add ($key, $value) | |
clear () | |
count () | |
filter (\Closure $closure, $static=true) | |
get ($key) | |
getAll (array $keys=null) | |
getIterator () | |
getKeys () | |
getPath ($path, $separator='/', $data=null) | |
hasKey ($key) | |
hasValue ($value) | |
inject ($input) | |
keySearch ($key) | |
map (\Closure $closure, array $context=array(), $static=true) | |
merge ($data) | |
offsetExists ($offset) | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetUnset ($offset) | |
overwriteWith ($data) | |
remove ($key) | |
replace (array $data) | |
set ($key, $value) | |
setPath ($path, $value) | |
toArray () | |
Static Public Member Functions | |
static | fromString ($query) |
![]() | |
static | fromConfig (array $config=array(), array $defaults=array(), array $required=array()) |
Data Fields | |
const | BLANK = "_guzzle_blank_" |
const | FORM_URLENCODED = 'application/x-www-form-urlencoded' |
const | RFC_3986 = 'RFC 3986' |
Protected Member Functions | |
prepareData (array $data) | |
Protected Attributes | |
$aggregator | |
$fieldSeparator = '&' | |
$urlEncode = 'RFC 3986' | |
$valueSeparator = '=' | |
![]() | |
$data | |
Query string object to handle managing query string parameters and aggregating those parameters together as a string.
Definition at line 14 of file QueryString.php.
Guzzle\Http\QueryString::__toString | ( | ) |
Convert the query string parameters to a query string string
RuntimeException |
Definition at line 105 of file QueryString.php.
References Guzzle\Http\QueryString\prepareData().
Guzzle\Http\QueryString::encodeValue | ( | $value | ) |
URL encodes a value based on the url encoding type of the query string object
string | $value | Value to encode |
Definition at line 246 of file QueryString.php.
References Guzzle\Http\QueryString\urlEncode().
Referenced by Guzzle\Http\QueryAggregator\CommaAggregator\aggregate(), Guzzle\Http\QueryAggregator\PhpAggregator\aggregate(), Guzzle\Http\QueryAggregator\DuplicateAggregator\aggregate(), and Guzzle\Http\QueryString\prepareData().
|
static |
Parse a query string into a QueryString object
string | $query | Query string to parse |
Definition at line 59 of file QueryString.php.
Referenced by Guzzle\Http\Url\factory(), Guzzle\Tests\Http\QueryStringTest\testAllowsBlankQueryStringValues(), Guzzle\Tests\Http\QueryStringTest\testAllowsFalsyQueryStringValues(), Guzzle\Tests\Http\QueryStringTest\testConvertsPlusSymbolsToSpaces(), Guzzle\Tests\Http\QueryStringTest\testFromStringDoesntMangleZeroes(), Guzzle\Tests\Http\QueryStringTest\testFromStringDoesntStripTrailingEquals(), Guzzle\Tests\Http\QueryStringTest\testFromStringIgnoresQuestionMark(), Guzzle\Tests\Http\QueryStringTest\testGuessesIfDuplicateAggregatorShouldBeUsed(), Guzzle\Tests\Http\QueryStringTest\testGuessesIfDuplicateAggregatorShouldBeUsedAndChecksForPhpStyle(), Guzzle\Tests\Http\QueryStringTest\testParsesQueryStrings(), and Guzzle\Tests\Http\QueryStringTest\testProperlyDealsWithDuplicateQueryStringValues().
Guzzle\Http\QueryString::getFieldSeparator | ( | ) |
Get the query string field separator
Definition at line 124 of file QueryString.php.
References Guzzle\Http\QueryString\$fieldSeparator.
Guzzle\Http\QueryString::getUrlEncoding | ( | ) |
Returns the type of URL encoding used by the query string
One of: false, "RFC 3986", or "application/x-www-form-urlencoded"
Definition at line 146 of file QueryString.php.
References Guzzle\Http\QueryString\$urlEncode.
Guzzle\Http\QueryString::getValueSeparator | ( | ) |
Get the query string value separator
Definition at line 134 of file QueryString.php.
References Guzzle\Http\QueryString\$valueSeparator.
Guzzle\Http\QueryString::isUrlEncoding | ( | ) |
Returns true or false if using URL encoding
Definition at line 156 of file QueryString.php.
References Guzzle\Http\QueryString\urlEncode().
Referenced by Guzzle\Http\QueryAggregator\CommaAggregator\aggregate(), and Guzzle\Http\QueryAggregator\DuplicateAggregator\aggregate().
|
protected |
Url encode parameter data and convert nested query strings into a flattened hash.
array | $data | The data to encode |
Definition at line 264 of file QueryString.php.
References Guzzle\Common\Collection\$data, Guzzle\Http\QueryString\encodeValue(), and Guzzle\Http\QueryString\setAggregator().
Referenced by Guzzle\Http\QueryString\__toString(), and Guzzle\Http\QueryString\urlEncode().
Guzzle\Http\QueryString::setAggregator | ( | QueryAggregatorInterface | $aggregator = null | ) |
Provide a function for combining multi-valued query string parameters into a single or multiple fields
null | QueryAggregatorInterface | $aggregator | Pass in a QueryAggregatorInterface object to handle converting deeply nested query string variables into a flattened array. Pass null to use the default PHP style aggregator. For legacy reasons, this function accepts a callable that must accepts a $key, $value, and query object. |
Definition at line 172 of file QueryString.php.
References Guzzle\Http\QueryString\$aggregator.
Referenced by Guzzle\Http\QueryString\prepareData().
Guzzle\Http\QueryString::setFieldSeparator | ( | $separator | ) |
Set the query string separator
string | $separator | The query string separator that will separate fields |
Definition at line 208 of file QueryString.php.
Guzzle\Http\QueryString::setValueSeparator | ( | $separator | ) |
Set the query string value separator
string | $separator | The query string separator that will separate values from fields |
Definition at line 222 of file QueryString.php.
Guzzle\Http\QueryString::urlEncode | ( | ) |
Returns an array of url encoded field names and values
Definition at line 234 of file QueryString.php.
References Guzzle\Http\QueryString\prepareData().
Referenced by Guzzle\Http\QueryString\encodeValue(), Guzzle\Http\QueryString\isUrlEncoding(), and Guzzle\Http\QueryString\useUrlEncoding().
Guzzle\Http\QueryString::useUrlEncoding | ( | $encode | ) |
Set whether or not field names and values should be rawurlencoded
bool | string | $encode | Set to TRUE to use RFC 3986 encoding (rawurlencode), false to disable encoding, or form_urlencoding to use application/x-www-form-urlencoded encoding (urlencode) |
Definition at line 194 of file QueryString.php.
References Guzzle\Http\QueryString\urlEncode().
|
protected |
Definition at line 47 of file QueryString.php.
Referenced by Guzzle\Http\QueryString\setAggregator().
|
protected |
Definition at line 29 of file QueryString.php.
Referenced by Guzzle\Http\QueryString\getFieldSeparator().
|
protected |
URL encode fields and values
Definition at line 41 of file QueryString.php.
Referenced by Guzzle\Http\QueryString\getUrlEncoding().
|
protected |
The query string value separator (e.g. '=')
Definition at line 35 of file QueryString.php.
Referenced by Guzzle\Http\QueryString\getValueSeparator().
const Guzzle\Http\QueryString::BLANK = "_guzzle_blank_" |
Definition at line 24 of file QueryString.php.
Referenced by Guzzle\Tests\Http\QueryStringTest\testAllowsBlankQueryStringValues(), and Guzzle\Tests\Http\QueryStringTest\testAllowsFalsyQueryStringValues().
const Guzzle\Http\QueryString::FORM_URLENCODED = 'application/x-www-form-urlencoded' |
Definition at line 21 of file QueryString.php.
Referenced by Guzzle\Tests\Http\QueryStringTest\testIsUrlEncoding().
const Guzzle\Http\QueryString::RFC_3986 = 'RFC 3986' |
Used to URL encode with rawurlencode
Definition at line 18 of file QueryString.php.