本文整理汇总了PHP中Doctrine\Common\Collections\Collection::getKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP Collection::getKeys方法的具体用法?PHP Collection::getKeys怎么用?PHP Collection::getKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\Common\Collections\Collection
的用法示例。
在下文中一共展示了Collection::getKeys方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getType
public function getType(string $type) : TypeInterface
{
if (false === $this->types->containsKey($type)) {
throw new TypeNotFoundException($type, $this->types->getKeys());
}
return $this->types->get($type);
}
示例2: getCountTotalEntries
/**
* Returns the total number of entries from all the feeds.
*
* @return int
*/
public function getCountTotalEntries()
{
if ($this->feeds->isEmpty()) {
return 0;
}
/** @var FeedEntryRepository $feedEntryRepository */
$feedEntryRepository = $this->em->getRepository('Phraseanet:FeedEntry');
return $feedEntryRepository->countByFeeds($this->feeds->getKeys());
}
示例3: testGetKeys
public function testGetKeys()
{
$this->_coll[] = 'one';
$this->_coll[] = 'two';
$this->assertEquals(array(0, 1), $this->_coll->getKeys());
}
示例4: getKeys
/**
* {@inheritdoc}
*/
public function getKeys()
{
$this->initialize();
return $this->coll->getKeys();
}
示例5: getKeys
/**
* Gets all keys/indices of the collection.
*
* @return array The keys/indices of the collection, in the order of the corresponding
* elements in the collection.
*/
function getKeys()
{
$this->initialize();
return $this->collection->getKeys();
}
示例6: getSystemNumbers
public function getSystemNumbers()
{
return $this->systems->getKeys();
}
示例7: getKeys
/**
* {@inheritdoc}
*/
public function getKeys()
{
return $this->inner->getKeys();
}
示例8: getGalaxyNumbers
public function getGalaxyNumbers()
{
return $this->galaxies->getKeys();
}
示例9: getMatchingPermissions
/**
* @param string $permission
* @return array
*/
protected function getMatchingPermissions($permission)
{
return array_filter($this->permissions->getKeys(), function ($key) use($permission) {
return Str::is($permission, $key) || Str::is($key, $permission);
});
}
示例10: testGetKeys
/**
* @dataProvider provideCollection
*/
public function testGetKeys(Collection $coll, array $elements)
{
$this->assertSame(array_keys($elements), $coll->getKeys());
}
示例11: getCelestialBodyNumbers
public function getCelestialBodyNumbers()
{
return $this->celestialBodies->getKeys();
}