lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php
public function prepareSortOrProjection(array $fields)
    {
        $preparedFields = array();

        foreach ($fields as $key => $value) {
            $preparedFields[$this->prepareFieldName($key)] = $value;
        }

        return $preparedFields;
    }
public function prepareSortOrProjection(array $fields)
    {
        $preparedFields = array();

        foreach ($fields as $key => $value) {
            $preparedFields[$this->prepareFieldName($key)] = $value;
        }

        return $preparedFields;
    }
public function prepareSortOrProjection ( array $ fields ) { $ preparedFields = array ( ) ; foreach ( $ fields as $ key => $ value ) { $ preparedFields [ $ this -> prepareFieldName ( $ key ) ] = $ value ; } return $ preparedFields ; }
Prepare a sort or projection array by converting keys, which are PHP
property names, to MongoDB field names.

@param array $fields
@return array
Prepare a sort or projection array by converting keys which are PHP property names to MongoDB field names .