PHP Class MongoBinData

Mostra file Open project: alcaeus/mongo-php-adapter Class Usage Examples

Public Properties

Property Type Description
$bin
$type

Public Methods

Method Description
__construct ( string $data, integer $type = 2 ) Creates a new binary data object.
__toString ( ) : string Returns the string "". To access the contents of a MongoBinData, use the bin field.
toBSONType ( ) : MongoDB\BSON\Binary Converts this MongoBinData to the new BSON Binary type

Method Details

__construct() public method

Creates a new binary data object.
public __construct ( string $data, integer $type = 2 )
$data string Binary data
$type integer Data type

__toString() public method

Returns the string "". To access the contents of a MongoBinData, use the bin field.
public __toString ( ) : string
return string

toBSONType() public method

Converts this MongoBinData to the new BSON Binary type
public toBSONType ( ) : MongoDB\BSON\Binary
return MongoDB\BSON\Binary

Property Details