MongoDB\BSON\Binary::getType

Returns the Binary's type

説明

final public int MongoDB\BSON\Binary::getType()

パラメータ

この関数にはパラメータはありません。

戻り値

Returns the Binary's type.

エラー / 例外

  • Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.

例1 MongoDB\BSON\Binary::getType example

<?php

$binary 
= new MongoDB\BSON\Binary('foo'MongoDB\BSON\Binary::TYPE_GENERIC);
var_dump($binary->getType());

?>

上の例の出力は以下となります。

int(0)