public function getKeys() { if (null === $this->entries) { $this->__load___(); } return $this->entries->getKeys(); }
/** * 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; }
/** * @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(); }
/** * 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(); }
/** * @return array of Car */ public function getCars() { $car_ids = $this->cars->getKeys(); return $this->em->getRepository('AppBundle:Car')->findBy(array('id' => $car_ids)); }
/** * 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(); }