protected function prepareResults(array &$results, array $options)
    {
        $reindexed = array();

        foreach ($results as &$result) {
            $this->prepareResult($result, $options);
            if (!empty($options['index'])) {
                $reindexed[$result[$options['index']]] = $result;
            }
        }

        if (!empty($options['index'])) {
            $results = $reindexed;
        }
    }
protected function prepareResults(array &$results, array $options)
    {
        $reindexed = array();

        foreach ($results as &$result) {
            $this->prepareResult($result, $options);
            if (!empty($options['index'])) {
                $reindexed[$result[$options['index']]] = $result;
            }
        }

        if (!empty($options['index'])) {
            $results = $reindexed;
        }
    }
protected function prepareResults ( array & $ results , array $ options ) { $ reindexed = array ( ) ; foreach ( $ results as & $ result ) { $ this -> prepareResult ( $ result , $ options ) ; if ( ! empty ( $ options [ 'index' ] ) ) { $ reindexed [ $ result [ $ options [ 'index' ] ] ] = $ result ; } } if ( ! empty ( $ options [ 'index' ] ) ) { $ results = $ reindexed ; } }
Prepares an array of results
@param array $results
@param array $options
Prepares an array of results