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;
    }
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;
    }
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 ; }
Queries for Keys matching a case insensitive expression

@param  string $match The expression to match against

@return array
Queries for Keys matching a case insensitive expression