本文整理匯總了PHP中Parse\ParseQuery::doesNotMatchQuery方法的典型用法代碼示例。如果您正苦於以下問題:PHP ParseQuery::doesNotMatchQuery方法的具體用法?PHP ParseQuery::doesNotMatchQuery怎麽用?PHP ParseQuery::doesNotMatchQuery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Parse\ParseQuery
的用法示例。
在下文中一共展示了ParseQuery::doesNotMatchQuery方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testDoesNotMatchQuery
public function testDoesNotMatchQuery()
{
Helper::clearClass("ChildObject");
Helper::clearClass("ParentObject");
$this->provideTestObjectsForQuery(10);
$subQuery = new ParseQuery("ChildObject");
$subQuery->greaterThan("x", 5);
$query = new ParseQuery("ParentObject");
$query->doesNotMatchQuery("child", $subQuery);
$results = $query->find();
$this->assertEquals(6, count($results), 'Did not return the correct object.');
foreach ($results as $parentObj) {
$this->assertLessThanOrEqual(15, $parentObj->get("x"), 'Did not return the correct object.');
$this->assertGreaterThanOrEqual(10, $parentObj->get("x"), 'Did not return the correct object.');
}
}
示例2: doesNotMatchQuery
/**
* Allow to pass instances of either Query or ParseQuery.
*
* @param string $key
* @param Query|ParseQuery $query
*
* @return $this
*/
public function doesNotMatchQuery($key, $query)
{
$this->parseQuery->doesNotMatchQuery($key, $this->parseQueryFromQuery($query));
return $this;
}