本文整理汇总了PHP中Parse::parseResponse方法的典型用法代码示例。如果您正苦于以下问题:PHP Parse::parseResponse方法的具体用法?PHP Parse::parseResponse怎么用?PHP Parse::parseResponse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parse
的用法示例。
在下文中一共展示了Parse::parseResponse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo $groupsRequest->getGroupsUsers('10000000-1000-3000-1111-100000000023');
echo $groupsRequest->getGroupsUsersId('10000000-1000-3000-1111-100000000023', '8dd06446-1179-e511-bf01-a1bb68598c42');
echo $groupsRequest->postGroups('phpGroup2', 'a group from php', '8be2a9c6-2c83-e511-bf05-9c4e36b08790');
echo $groupsRequest->putGroups('22dbf0ca-c783-e511-bf05-9c4e36b08790', 'Python Group 2', 'python2');
// INDEX FIELDS
echo $indexFieldsRequest->getIndexFields();
echo $indexFieldsRequest->postIndexFields('favorite foods2', 'a list of favorite foods', 2, '00000000-0000-0000-0000-000000000000', '390A1704-B481-E511-BF03-008CFA482110', true, 'pakistani');
echo $indexFieldsRequest->putIndexFields('0ca8c2ae-3778-e511-bf00-bfff3cb84a46', 'departments list', 'new description', 2, 'd19af16a-3678-e511-bf00-bfff3cb84a46', 'd19af16a-3678-e511-bf00-bfff3cb84a46', true, 'default');
echo $indexFieldsRequest->relateIndexFields('0ca8c2ae-3778-e511-bf00-bfff3cb84a46', '40ac2b37-9a72-e511-befe-98991b71acc0');
// META
echo $metaRequest->getMeta();
echo $metaRequest->getMetaData('PersistedData');
// PARSE
$r = $docRequest->getDocIndexFields('3c7168e7-4b82-e511-bf04-008cfa482110');
$s = $docRequest->getDocIndexFieldsId('3c7168e7-4b82-e511-bf04-008cfa482110', '6684bdbe-4f82-e511-bf04-008cfa482110');
echo $parseRequest->parseResponse($r, 'label');
$a = $parseRequest->parseListResponse($r, 'label', '5');
// PERSISTED DATA
echo $pdataRequest->deletePdata('7832c856-7467-4356-a56e-968f9db56f48');
echo $pdataRequest->getPdata();
echo $pdataRequest->getPdataId('17bd31bb-6cd6-43b0-be65-55e2002d91a6');
echo $pdataRequest->postPdata('phpPDATA4', 1, "{\"DataField2\":\"claro que si\",\"DataField4\":\"oh no no no\"}", 'text/JSON', '', 0, null);
echo $pdataRequest->postFormPdata('9d4d2408-1183-e511-bf05-9c4e36b08790', 'c054e3bb-bd4c-4185-8d45-cf062d369a66', '6ccf5264-4f8d-e511-bf05-9c4e36b08790');
// SITES
echo $sitesRequest->getSites();
echo $sitesRequest->getSitesId('2e2fbf9c-1079-e511-bf01-a1bb68598c42');
echo $sitesRequest->getSitesGroups('2e2fbf9c-1079-e511-bf01-a1bb68598c42');
echo $sitesRequest->getSitesGroupsId('2e2fbf9c-1079-e511-bf01-a1bb68598c42', 'b9a66abf-2b83-e511-bf05-9c4e36b08790');
echo $sitesRequest->getSitesUsers('2e2fbf9c-1079-e511-bf01-a1bb68598c42');
echo $sitesRequest->getSitesUsersId('2e2fbf9c-1079-e511-bf01-a1bb68598c42', '8dd06446-1179-e511-bf01-a1bb68598c42');
echo $sitesRequest->postSites('phpFUN2', 'a new php site');
示例2: echoList
$formInstanceRequest = new FormInstance();
$formTemplatesRequest = new FormTemplates();
$groupsRequest = new Groups();
$indexFieldsRequest = new IndexFields();
$metaRequest = new Meta();
$parseRequest = new Parse();
$pdataRequest = new PersistedData();
$sitesRequest = new Sites();
$usersRequest = new Users();
// PARSE RESPONSE
// parseResponse() (single field value returned)
// for the parseResponse method a single field value is returned requested by the field name.
// lets pass in a method to create a folder and store the response as $a.
$a = $foldersRequest->postFolder('folder3', 'folder description', true);
// now we pass in the response to the parseRequest method and request the folderId and store it as $b.
$b = $parseRequest->parseResponse($a, 'id');
// now we have the folderId. we can display it or pass it into another method.
// lets create a document and pass in the folderId $b.
echo $docRequest->postDoc($b, 1, 'phpParseFile', 'a test file', 'parse.txt', '{}');
// parseListResponse() (list of field values returned)
// for the parseListResponse method an array is returned.
// we write a sample function here to display the results.
function echoList($array, $itemCount)
{
for ($i = 0; $i < $itemCount; $i++) {
echo $array[$i] . "\n";
}
}
// now the getUsers() method is called and the response is stored as a variable $c.
$c = $usersRequest->getUsers();
// now we pass in the response from the getUsers() call and request a list of 10 userId's