getKeys() public method

{@inheritDoc}
public getKeys ( )
コード例 #1
0
 public function getKeys()
 {
     if (null === $this->entries) {
         $this->__load___();
     }
     return $this->entries->getKeys();
 }
コード例 #2
0
ファイル: Collection.php プロジェクト: kmfk/slowdb
 /**
  * Queries for Keys matching a case insensitive expression
  *
  * @param  string $match The expression to match against
  *
  * @return array
  */
 public function query($match)
 {
     $keys = $this->index->getKeys();
     $matches = array_filter($keys, function ($key) use($match) {
         return preg_match("/{$match}/i", $key);
     });
     $results = [];
     foreach ($matches as $match) {
         $result = $this->get($match);
         $results[key($result)] = current($result);
     }
     return $results;
 }
コード例 #3
0
 /**
  * @dataProvider provideDifferentElements
  */
 public function testGetKeys($elements)
 {
     $collection = new ArrayCollection($elements);
     $this->assertSame(array_keys($elements), $collection->getKeys());
 }
コード例 #4
0
 /** {@inheritDoc} */
 public function getKeys()
 {
     $this->initialize();
     return $this->collection->getKeys();
 }
コード例 #5
0
ファイル: ImmutableCollection.php プロジェクト: Rybbow/x-blog
 /**
  * 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.
  */
 public function getKeys()
 {
     return $this->collection->getKeys();
 }
コード例 #6
0
ファイル: Cart.php プロジェクト: s181150/my_project_name
 /**
  * @return array of Car
  */
 public function getCars()
 {
     $car_ids = $this->cars->getKeys();
     return $this->em->getRepository('AppBundle:Car')->findBy(array('id' => $car_ids));
 }
コード例 #7
0
ファイル: Database.php プロジェクト: kmfk/slowdb
 /**
  * Drops all the Collection in the Database
  */
 public function dropAll()
 {
     foreach ($this->collections->getKeys() as $collection) {
         $this->drop($collection);
     }
 }
コード例 #8
0
 function getKeys()
 {
     return $this->fields->getKeys();
 }