« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 43 for bsonSerialize (0.001 sec.)
Returns an object for BSON serialization 10273
« MongoDB\Driver\ReadConcern MongoDB\Driver\ReadConcern::__construct » PHP Manual MongoDB\Driver\ReadConcern Returns an object for BSON serialization 検索 MongoDB\Driver\ReadConcern::bsonSerialize (mongodb >=1.2.0) MongoDB\Driver\ReadConcer ... n::bsonSerialize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\ReadConcern::bsonSerialize (): stdCla ... 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\ReadConcern::bsonSerialize() with empty read concern <?php $rc = new MongoDB\Driver\ReadConcern ; var_dump ( $rc -> bsonSerialize ()); echo "\n" , Mo ... JSON (); ?> 上の例の出力は、 たとえば以下のようになります。 object(stdClass)#2 (0) { } { } 例2 MongoDB\Driver\ReadConcern::bsonSerialize() with local read concern <?php $rc = new MongoDB\Driver\ReadConcern ( MongoDB\Driver\ReadConcern :: LOCAL ); var_dump ( $ ...
https://man.mtool.work/php/8.3/mongodb-driver-readconcern.bsonserialize.html
Returns an object for BSON serialization 10273
« MongoDB\Driver\ReadConcern MongoDB\Driver\ReadConcern::__construct » PHP Manual MongoDB\Driver\ReadConcern Returns an object for BSON serialization 検索 MongoDB\Driver\ReadConcern::bsonSerialize (mongodb >=1.2.0) MongoDB\Driver\ReadConcer ... n::bsonSerialize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\ReadConcern::bsonSerialize (): stdCla ... 例外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\ReadConcern::bsonSerialize() with empty read concern <?php $rc = new MongoDB\Driver\ReadConcern ; var_dump ( $rc -> bsonSerialize ()); echo "\n" , Mo ... JSON (); ?> 上の例の出力は、 たとえば以下のようになります。 object(stdClass)#2 (0) { } { } 例2 MongoDB\Driver\ReadConcern::bsonSerialize() with local read concern <?php $rc = new MongoDB\Driver\ReadConcern ( MongoDB\Driver\ReadConcern :: LOCAL ); var_dump ( $ ...
https://man.mtool.work/php/8.3/mongodb-driver-readconcern.bsonserialize.html
Returns an object for BSON serialization 10119
« MongoDB\Driver\ReadPreference MongoDB\Driver\ReadPreference::__construct » PHP Manual MongoDB\Driver\ReadPreference Returns an object for BSON serialization 検索 MongoDB\Driver\ReadPreference::bsonSerialize (mongodb >=1.2.0) MongoDB\Drive ... r\ReadPreference::bsonSerialize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\ReadPreference::bsonSerialize (): std ... Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\ReadPreference::bsonSerialize() with primary read preference <?php $rp = new MongoDB\Driver\ReadPreference ( MongoDB\Driver\ReadPreference :: PRIMARY ); ... var_dump ( $rp -> bsonSerialize ()); echo "\n" , MongoDB\BSON\Document :: fromPHP ( $rp )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のよ ...
https://man.mtool.work/php/8.3/mongodb-driver-readpreference.bsonserialize.html
Returns an object for BSON serialization 10119
« MongoDB\Driver\ReadPreference MongoDB\Driver\ReadPreference::__construct » PHP Manual MongoDB\Driver\ReadPreference Returns an object for BSON serialization 検索 MongoDB\Driver\ReadPreference::bsonSerialize (mongodb >=1.2.0) MongoDB\Drive ... r\ReadPreference::bsonSerialize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\ReadPreference::bsonSerialize (): std ... Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\ReadPreference::bsonSerialize() with primary read preference <?php $rp = new MongoDB\Driver\ReadPreference ( MongoDB\Driver\ReadPreference :: PRIMARY ); ... var_dump ( $rp -> bsonSerialize ()); echo "\n" , MongoDB\BSON\Document :: fromPHP ( $rp )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のよ ...
https://man.mtool.work/php/8.3/mongodb-driver-readpreference.bsonserialize.html
Returns an object for BSON serialization 10073
« MongoDB\Driver\WriteConcern MongoDB\Driver\WriteConcern::__construct » PHP Manual MongoDB\Driver\WriteConcern Returns an object for BSON serialization 検索 MongoDB\Driver\WriteConcern::bsonSerialize (mongodb >=1.2.0) MongoDB\Driver\WriteC ... oncern::bsonSerialize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\WriteConcern::bsonSerialize (): stdCl ... 外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\WriteConcern::bsonSerialize() with majority write concern <?php $wc = new MongoDB\Driver\WriteConcern ( MongoDB\Driver\WriteConcern :: MAJORITY ); var ... _dump ( $wc -> bsonSerialize ()); echo "\n" , MongoDB\BSON\Document :: fromPHP ( $wc )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のよ ...
https://man.mtool.work/php/8.3/mongodb-driver-writeconcern.bsonserialize.html
Returns an object for BSON serialization 10073
« MongoDB\Driver\WriteConcern MongoDB\Driver\WriteConcern::__construct » PHP Manual MongoDB\Driver\WriteConcern Returns an object for BSON serialization 検索 MongoDB\Driver\WriteConcern::bsonSerialize (mongodb >=1.2.0) MongoDB\Driver\WriteC ... oncern::bsonSerialize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\WriteConcern::bsonSerialize (): stdCl ... 外 Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors. 例 例1 MongoDB\Driver\WriteConcern::bsonSerialize() with majority write concern <?php $wc = new MongoDB\Driver\WriteConcern ( MongoDB\Driver\WriteConcern :: MAJORITY ); var ... _dump ( $wc -> bsonSerialize ()); echo "\n" , MongoDB\BSON\Document :: fromPHP ( $wc )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のよ ...
https://man.mtool.work/php/8.3/mongodb-driver-writeconcern.bsonserialize.html
Provides an array or document to serialize as BSON 9841
« MongoDB\BSON\Serializable MongoDB\BSON\Unserializable » PHP Manual MongoDB\BSON\Serializable Provides an array or document to serialize as BSON 検索 MongoDB\BSON\Serializable::bsonSerialize (mongodb >=1.0.0) MongoDB\BSON\Serializable::bsonSerialize ... nSerialize — Provides an array or document to serialize as BSON 説明 abstract public function MongoDB\BSON\Serializable::bsonSerialize (): array | stdClass | MongoDB\BSON\Document | MongoDB\BSON\PackedArray Called during serialization of the object to BSON. ... tored as root documents. They are stored as arrays when used as an embedded field value. 例 例1 MongoDB\BSON\Serializable::bsonSerialize() returning an associative array for root document <?php class MyDocument implements MongoDB\BSON\Serializable { private $ ... id ; function __construct () { $this -> id = new MongoDB\BSON\ObjectId ; } function bsonSerialize (): array { return [ '_id' => $this -> id , 'foo' => 'bar' ]; } } echo MongoDB\BSON\Document :: fromPHP (new MyDocument )- ...
https://man.mtool.work/php/8.3/mongodb-bson-serializable.bsonserialize.html
Provides an array or document to serialize as BSON 9841
« MongoDB\BSON\Serializable MongoDB\BSON\Unserializable » PHP Manual MongoDB\BSON\Serializable Provides an array or document to serialize as BSON 検索 MongoDB\BSON\Serializable::bsonSerialize (mongodb >=1.0.0) MongoDB\BSON\Serializable::bsonSerialize ... nSerialize — Provides an array or document to serialize as BSON 説明 abstract public function MongoDB\BSON\Serializable::bsonSerialize (): array | stdClass | MongoDB\BSON\Document | MongoDB\BSON\PackedArray Called during serialization of the object to BSON. ... tored as root documents. They are stored as arrays when used as an embedded field value. 例 例1 MongoDB\BSON\Serializable::bsonSerialize() returning an associative array for root document <?php class MyDocument implements MongoDB\BSON\Serializable { private $ ... id ; function __construct () { $this -> id = new MongoDB\BSON\ObjectId ; } function bsonSerialize (): array { return [ '_id' => $this -> id , 'foo' => 'bar' ]; } } echo MongoDB\BSON\Document :: fromPHP (new MyDocument )- ...
https://man.mtool.work/php/8.3/mongodb-bson-serializable.bsonserialize.html
The MongoDB\BSON\Persistable interface 9425
« MongoDB\BSON\Type MongoDB\BSON\Persistable::bsonSerialize » PHP Manual MongoDB\BSON The MongoDB\BSON\Persistable interface 検索 The MongoDB\BSON\Persistable interface (mongodb >=1.0.0) はじめに Classes may implement this interface to take ... tension will inject a __pclass property containing the PHP class name into the data returned by MongoDB\BSON\Serializable::bsonSerialize() . During unserialization, the same __pclass property will then be used to infer the PHP class (independent of any type m ... e::bsonUnserialize() is invoked. See Persisting Data for additional information. 注意 : Even if MongoDB\BSON\Serializable::bsonSerialize() would return a sequential array, injection of the __pclass property will cause the object to be serialized as a BSON doc ... N\Persistable implements MongoDB\BSON\Unserializable , MongoDB\BSON\Serializable { /* メソッド */ abstract public function bsonSerialize (): array | stdClass | MongoDB\BSON\Document /* 継承したメソッド */ abstract public function MongoDB\BSON\Serializable::bs ...
https://man.mtool.work/php/8.3/class.mongodb-bson-persistable.html
The MongoDB\BSON\Persistable interface 9425
« MongoDB\BSON\Type MongoDB\BSON\Persistable::bsonSerialize » PHP Manual MongoDB\BSON The MongoDB\BSON\Persistable interface 検索 The MongoDB\BSON\Persistable interface (mongodb >=1.0.0) はじめに Classes may implement this interface to take ... tension will inject a __pclass property containing the PHP class name into the data returned by MongoDB\BSON\Serializable::bsonSerialize() . During unserialization, the same __pclass property will then be used to infer the PHP class (independent of any type m ... e::bsonUnserialize() is invoked. See Persisting Data for additional information. 注意 : Even if MongoDB\BSON\Serializable::bsonSerialize() would return a sequential array, injection of the __pclass property will cause the object to be serialized as a BSON doc ... N\Persistable implements MongoDB\BSON\Unserializable , MongoDB\BSON\Serializable { /* メソッド */ abstract public function bsonSerialize (): array | stdClass | MongoDB\BSON\Document /* 継承したメソッド */ abstract public function MongoDB\BSON\Serializable::bs ...
https://man.mtool.work/php/8.3/class.mongodb-bson-persistable.html
PREV 1 2 3 4 5 NEXT