protected function QuickEditLoadingTest::serializePostValues in Quick Edit 7
Serialize POST HTTP request values.
Encode according to application/x-www-form-urlencoded. Both names and values needs to be urlencoded, according to http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1
Parameters
array $post: The array of values to be POSTed.
Return value
string The serialized result.
1 call to QuickEditLoadingTest::serializePostValues()
- QuickEditLoadingTest::drupalPostCustom in ./
quickedit.test - Perform a POST HTTP request in a non-form context.
File
- ./
quickedit.test, line 586 - Tests loading of Quick Edit and lazy-loading of in-place editors.
Class
- QuickEditLoadingTest
- Tests loading of Quick Edit and lazy-loading of in-place editors.
Code
protected function serializePostValues($post = array()) {
foreach ($post as $key => $value) {
$post[$key] = urlencode($key) . '=' . urlencode($value);
}
return implode('&', $post);
}