本文整理汇总了PHP中Parse\ParseQuery::matchesKeyInQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseQuery::matchesKeyInQuery方法的具体用法?PHP ParseQuery::matchesKeyInQuery怎么用?PHP ParseQuery::matchesKeyInQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parse\ParseQuery
的用法示例。
在下文中一共展示了ParseQuery::matchesKeyInQuery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: matchesKeyInQuery
/**
* Allow to pass instances of either Query or ParseQuery.
*
* @param string $key
* @param Query|ParseQuery $query
*
* @return $this
*/
public function matchesKeyInQuery($key, $queryKey, $query)
{
$this->parseQuery->matchesKeyInQuery($key, $queryKey, $this->parseQueryFromQuery($query));
return $this;
}
示例2: testMatchesKeyInQuery
public function testMatchesKeyInQuery()
{
$this->provideTestObjectsForKeyInQuery();
$subQuery = new ParseQuery("Restaurant");
$subQuery->greaterThan("ratings", 4);
$query = new ParseQuery("Person");
$query->matchesKeyInQuery("hometown", "location", $subQuery);
$results = $query->find();
$this->assertEquals(1, count($results), 'Did not return correct number of objects.');
$this->assertEquals("Bob", $results[0]->get("name"), 'Did not return the correct object.');
}