« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 2 of about 2 for AnotherClass (0.001 sec.)
Serialization and deserialization of PHP variables into MongoDB 9357
« Connections Security » PHP Manual Driver Architecture and Internals Serialization and deserialization of PHP variables into MongoDB 検索 Serialization and deserialization of PHP variables into MongoDB This document discusses how compound ... oo": 42} class MyClass { public $foo = 42 ; protected $prot = 'wine' ; private $fpr = 'cheese' ; } // => {"foo": 42} class AnotherClass1 implements MongoDB\BSON\Serializable { public $foo = 42 ; protected $prot = 'wine' ; private $fpr = 'cheese' ; public fun ... ialize (): array { return [ 'foo' => $this -> foo , 'prot' => $this -> prot ]; } } // => {"foo": 42, "prot": "wine"} class AnotherClass2 implements MongoDB\BSON\Serializable { public $foo = 42 ; public function bsonSerialize (): self { return $this ; } } // ... => MongoDB\Driver\Exception\UnexpectedValueException("bsonSerialize() did not return an array or stdClass") class AnotherClass3 implements MongoDB\BSON\Serializable { private $elements = [ 'foo' , 'bar' ]; public function bsonSerialize (): array { r ...
https://man.mtool.work/php/8.3/mongodb.persistence.html
Serialization and deserialization of PHP variables into MongoDB 9357
« Connections Security » PHP Manual Driver Architecture and Internals Serialization and deserialization of PHP variables into MongoDB 検索 Serialization and deserialization of PHP variables into MongoDB This document discusses how compound ... oo": 42} class MyClass { public $foo = 42 ; protected $prot = 'wine' ; private $fpr = 'cheese' ; } // => {"foo": 42} class AnotherClass1 implements MongoDB\BSON\Serializable { public $foo = 42 ; protected $prot = 'wine' ; private $fpr = 'cheese' ; public fun ... ialize (): array { return [ 'foo' => $this -> foo , 'prot' => $this -> prot ]; } } // => {"foo": 42, "prot": "wine"} class AnotherClass2 implements MongoDB\BSON\Serializable { public $foo = 42 ; public function bsonSerialize (): self { return $this ; } } // ... => MongoDB\Driver\Exception\UnexpectedValueException("bsonSerialize() did not return an array or stdClass") class AnotherClass3 implements MongoDB\BSON\Serializable { private $elements = [ 'foo' , 'bar' ]; public function bsonSerialize (): array { r ...
https://man.mtool.work/php/8.3/mongodb.persistence.html
PREV 1 NEXT