Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 9383

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Creates a new binary data object.</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.mongobindata.html">MongoBinData</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongobindata.tostring.html">MongoBinData::__toString</a></div>
 <div class="up"><a href="class.mongobindata.html">MongoBinData</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongobindata.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoBinData::__construct</h1>
  <p class="verinfo">(PECL mongo &gt;= 0.8.1)</p><p class="refpurpose"><span class="refname">MongoBinData::__construct</span> &mdash; <span class="dc-title">Creates a new binary data object.</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongobindata.construct-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>  <span class="methodname"><strong>MongoBinData::__construct</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code><span class="initializer"> = 2</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Creates a new binary data object.
  </p>
  <p class="para">
   There are five types of binary data currently recognized by the BSON spec:
   function (0x01), byte array (0x02), UUID (0x03), MD5 (0x05), and user defined 
   (0x80).  The default type is byte array (0x02).  There is no particular 
   difference in how the driver or server interpret different types, so by and
   large they are irrelevant for now.  Any number (between 0 and 255) could be 
   used for type, if the user is willing to assume the risk that the database
   might eventually do something with binary data based on type.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongobindata.construct-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term">
      <em><code class="parameter">data</code></em>
     </span>
     <dd>

      <p class="para">
       Binary data.
      </p>
     </dd>

    </dt>
     
    <dt>

     <span class="term">
      <em><code class="parameter">type</code></em>
     </span>
     <dd>

      <p class="para">
       Data type.
      </p>
     </dd>

    </dt>
     
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongobindata.construct-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a new binary data object.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-mongobindata.construct-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>1.2.11</td>
       <td>
        Emits <strong><code>E_DEPRECATED</code></strong> when the second argument is not
        used. The default value for <em><code class="parameter">type</code></em> may change in
        the near future.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.mongobindata.html">MongoBinData</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongobindata.tostring.html">MongoBinData::__toString</a></div>
 <div class="up"><a href="class.mongobindata.html">MongoBinData</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>