MongoBinData::__construct
(PECL mongo >= 0.8.1)
MongoBinData::__construct — Creates a new binary data object
このメソッドを定義している拡張モジュールは非推奨です。
かわりに MongoDB 拡張モジュールを使うべきです。 このメソッドの代替として、以下が使えます。
説明
public MongoBinData::__construct
( string $data
[, int $type
= 0
] )
Creates a new binary data object.
There are seven types of binary data currently recognized by the BSON spec,
which are defined as
class constants. For
backwards compatibility, the PHP driver uses
MongoBinData::BYTE_ARRAY
as the default; however, this
may change to MongoBinData::GENERIC
in the future.
Users are encouraged to specify a type instead of relying on the default.
パラメータ
data
- Binary data.
type
- Data type.
返り値
Returns a new binary data object.
変更履歴
バージョン | 説明 |
---|---|
PECL mongo 1.5.0 | The default changed from 2
( |
PECL mongo 1.2.11 | Emits E_DEPRECATED when the second argument is not
used. The default value for |