The MongoDB\BSON\PackedArray class

(mongodb >=1.16.0)

Einführung

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

Klassenbeschreibung

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

Changelog

Version Beschreibung
PECL mongodb 2.0.0

Diese Klasse implementiert nicht mehr die Serializable-Schnittstelle.

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.

Inhaltsverzeichnis