The MongoDB\BSON\PackedArray class

(mongodb >=1.16.0)

Introduction

Represents a BSON array. This class is used when reading data as raw BSON and cannot be modified.

Class synopsis

final class MongoDB\BSON\PackedArray implements MongoDB\BSON\Type , ArrayAccess , IteratorAggregate {
/* Methods */
final private __construct ()
final static public fromJSON (string $json): MongoDB\BSON\PackedArray
final static public fromPHP (array $value): MongoDB\BSON\PackedArray
final public get (int $key): mixed
final public has (int $index): bool
final public offsetExists (mixed $key): bool
final public offsetGet (mixed $key): mixed
final public offsetSet (mixed $key, mixed $value): void
final public offsetUnset (mixed $key): void
final public toPHP (? array $typeMap = null ): array |object
final public toRelaxedExtendedJSON (): string
final public __toString (): string
}

Changelog

Version Description
PECL mongodb 2.0.0

This class no longer implements the Serializable interface.

PECL mongodb 1.17.0 Implements MongoDB\BSON\Type .
PECL mongodb 1.17.0 MongoDB\BSON\PackedArray cannot be serialized in contexts where a BSON document is expected. In earlier versions, the BSON array would have been converted to a document.

Table of Contents

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /