public function getType(string $type) : TypeInterface
 {
     if (false === $this->types->containsKey($type)) {
         throw new TypeNotFoundException($type, $this->types->getKeys());
     }
     return $this->types->get($type);
 }
Esempio n. 2
0
 /**
  * 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());
 }
Esempio n. 3
0
 public function testGetKeys()
 {
     $this->_coll[] = 'one';
     $this->_coll[] = 'two';
     $this->assertEquals(array(0, 1), $this->_coll->getKeys());
 }
 /**
  * {@inheritdoc}
  */
 public function getKeys()
 {
     $this->initialize();
     return $this->coll->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();
 }
Esempio n. 6
0
 public function getSystemNumbers()
 {
     return $this->systems->getKeys();
 }
 /**
  * {@inheritdoc}
  */
 public function getKeys()
 {
     return $this->inner->getKeys();
 }
Esempio n. 8
0
 public function getGalaxyNumbers()
 {
     return $this->galaxies->getKeys();
 }
Esempio n. 9
0
 /**
  * @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);
     });
 }
Esempio n. 10
0
 /**
  * @dataProvider provideCollection
  */
 public function testGetKeys(Collection $coll, array $elements)
 {
     $this->assertSame(array_keys($elements), $coll->getKeys());
 }
Esempio n. 11
0
 public function getCelestialBodyNumbers()
 {
     return $this->celestialBodies->getKeys();
 }