本文整理汇总了PHP中Parse\ParseQuery::doesNotExist方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseQuery::doesNotExist方法的具体用法?PHP ParseQuery::doesNotExist怎么用?PHP ParseQuery::doesNotExist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parse\ParseQuery
的用法示例。
在下文中一共展示了ParseQuery::doesNotExist方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSeekers
function getSeekers()
{
$query = new ParseQuery("BagTransaction");
$query->doesNotExist("status");
$results = $query->find();
$users = array();
//convert BagTransactions to Users
foreach ($results as $result) {
$user = $result->get("borrower");
$user->fetch();
$users[] = $user;
}
return $users;
}
示例2: testDoesNotExistRelation
public function testDoesNotExistRelation()
{
Helper::clearClass("Item");
$this->saveObjects(9, function ($i) {
$obj = ParseObject::create("TestObject");
if ($i & 1) {
$obj->set('y', $i);
} else {
$item = ParseObject::create("Item");
$item->set('x', $i);
$obj->set('x', $i);
}
return $obj;
});
$query = new ParseQuery("TestObject");
$query->doesNotExist('x');
$results = $query->find();
$this->assertEquals(4, count($results), 'Did not return correct number of objects.');
}
示例3: header
$response->errorDescription = "master key empty.";
}
}
}
header('Content-type: application/json');
echo stripslashes(json_encode($response));
} else {
ParseClient::initialize(PARSE_APPLICATION_ID, PARSE_REST_API_KEY, PARSE_MASTER_KEY);
$subFolderPath = 'images';
// SubFolder検出
$queryStoreSubFolder = new ParseQuery(IDF_STORE_SUB_FOLDER_CLASS_NAME);
$s_folderSelector = htmlspecialchars($_POST['selector'], ENT_QUOTES);
if (strlen($s_folderSelector) > 0) {
$queryStoreSubFolder->equalTo('selector', $s_folderSelector);
} else {
$queryStoreSubFolder->doesNotExist('selector');
}
// サブフォルダを検索
$resultsStoreSubFolder = $queryStoreSubFolder->find();
// ランダムで取得
if (count($resultsStoreSubFolder)) {
$subfolderObject = $resultsStoreSubFolder[array_rand($resultsStoreSubFolder, 1)];
$subFolderPath = $subfolderObject->get('path');
$dir = getcwd() . '/' . $subFolderPath;
if (!is_dir($dir)) {
if (!mkdir($dir)) {
throw new RuntimeException('Failed to create directory: ' . $dir);
}
chmod($dir, 0777);
}
}
示例4: whereNotExists
public function whereNotExists($key)
{
$this->parseQuery->doesNotExist($key);
return $this;
}
示例5: getOpenBikesWithinDistance
function getOpenBikesWithinDistance($latitude, $longitude, $radius)
{
$point = new ParseGeoPoint($latitude, $longitude);
$query = new ParseQuery("Bikes");
$query->includeKey("currentUser");
$query->doesNotExist("currentUser");
$query->withinMiles("lastLocation", $point, $radius);
$query->limit(1000);
$results = $query->find();
$count = count($results);
$listOfBikes = array();
for ($i = 0; $i < $count; $i++) {
$bike = $results[$i];
$ID = $bike->getObjectId();
$point = $bike->get("lastLocation");
$lat = $point->getLatitude();
$long = $point->getLongitude();
$object = new stdClass();
$object->bikeID = $ID;
$object->latitude = $lat;
$object->longitude = $long;
array_push($listOfBikes, $object);
}
return $listOfBikes;
}