예제 #1
0
 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
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());
 }
예제 #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();
 }
예제 #5
0
 /**
  * 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
0
파일: Galaxy.php 프로젝트: iw-reload/iw
 public function getSystemNumbers()
 {
     return $this->systems->getKeys();
 }
 /**
  * {@inheritdoc}
  */
 public function getKeys()
 {
     return $this->inner->getKeys();
 }
예제 #8
0
파일: Universe.php 프로젝트: iw-reload/iw
 public function getGalaxyNumbers()
 {
     return $this->galaxies->getKeys();
 }
예제 #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);
     });
 }
예제 #10
0
 /**
  * @dataProvider provideCollection
  */
 public function testGetKeys(Collection $coll, array $elements)
 {
     $this->assertSame(array_keys($elements), $coll->getKeys());
 }
예제 #11
0
파일: System.php 프로젝트: iw-reload/iw
 public function getCelestialBodyNumbers()
 {
     return $this->celestialBodies->getKeys();
 }