private function dumpBsonObject(Type $object)
    {
        if ($object instanceof Binary) {
            return $object->getData();
        }
        if (method_exists($object, '__toString')) {
            return $object->__toString();
        }
        return ArrayHelper::toArray($object);
    }
private function dumpBsonObject(Type $object)
    {
        if ($object instanceof Binary) {
            return $object->getData();
        }
        if (method_exists($object, '__toString')) {
            return $object->__toString();
        }
        return ArrayHelper::toArray($object);
    }
private function dumpBsonObject ( Type $ object ) { if ( $ object instanceof Binary ) { return $ object -> getData ( ) ; } if ( method_exists ( $ object , '__toString' ) ) { return $ object -> __toString ( ) ; } return ArrayHelper :: toArray ( $ object ) ; }
Converts MongoDB BSON object to readable value.
@param Type $object MongoDB BSON object.
@return array|string object dump value.
@since 2.1
Converts MongoDB BSON object to readable value .