getKeys() public method

{@inheritDoc}
public getKeys ( )
 public function getKeys()
 {
     if (null === $this->entries) {
         $this->__load___();
     }
     return $this->entries->getKeys();
 }
Example #2
0
 /**
  * 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;
 }
Example #3
0
 /**
  * @dataProvider provideDifferentElements
  */
 public function testGetKeys($elements)
 {
     $collection = new ArrayCollection($elements);
     $this->assertSame(array_keys($elements), $collection->getKeys());
 }
 /** {@inheritDoc} */
 public function getKeys()
 {
     $this->initialize();
     return $this->collection->getKeys();
 }
Example #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.
  */
 public function getKeys()
 {
     return $this->collection->getKeys();
 }
Example #6
0
 /**
  * @return array of Car
  */
 public function getCars()
 {
     $car_ids = $this->cars->getKeys();
     return $this->em->getRepository('AppBundle:Car')->findBy(array('id' => $car_ids));
 }
Example #7
0
 /**
  * Drops all the Collection in the Database
  */
 public function dropAll()
 {
     foreach ($this->collections->getKeys() as $collection) {
         $this->drop($collection);
     }
 }
 function getKeys()
 {
     return $this->fields->getKeys();
 }