downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoBinData::__construct> <MongoRegex::__toString
Last updated: Fri, 13 Nov 2009

view this page in

The MongoBinData class

Introduction

An object that can be used to store or retrieve binary data from the database.

The maximum size of a single object that can be inserted into the database is 4Mb. For data that is larger than this (movies, music, Henry Kissinger's autobiography), use MongoGridFS. For data that is smaller than 4Mb, it will probably be easier to just embed it into the document using MongoBinData.

<?php

$profile 
= array("username" => "foobity",
    
"pic" => new MongoBinData(get_file_contents("gravatar.jpg"));

$users->save($profile);

?>

Class synopsis

MongoBinData
MongoBinData {
/* Fields */
public string $bin ;
public int $type = 2 ;
/* Methods */
public __construct ( string $data [, int $type ] )
public string __toString ( void )
}

Table of Contents



add a note add a note User Contributed Notes
MongoBinData
There are no user contributed notes for this page.

MongoBinData::__construct> <MongoRegex::__toString
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites