src/Hydrator.php
private function extractField($key, array $data)
    {
        if (!isset($data[$key])) {
            throw PersisterException::badRequest(sprintf('Unable to extract a field value. The "%s" key was not found.', $key));
        }
        return $data[$key];
    }
private function extractField($key, array $data)
    {
        if (!isset($data[$key])) {
            throw PersisterException::badRequest(sprintf('Unable to extract a field value. The "%s" key was not found.', $key));
        }
        return $data[$key];
    }
private function extractField ( $ key , array $ data ) { if ( ! isset ( $ data [ $ key ] ) ) { throw PersisterException :: badRequest ( sprintf ( 'Unable to extract a field value. The "%s" key was not found.' , $ key ) ) ; } return $ data [ $ key ] ; }
Extracts a root field from a raw MongoDB result.

@param   string  $key
@param   array   $data
@return  mixed
@throws  PersisterException
Extracts a root field from a raw MongoDB result .