本文整理汇总了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;
}