<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/mongodb.bson.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'class.mongodb-bson-timestamp.php',
    1 => 'MongoDB\\BSON\\Timestamp',
    2 => 'A classe MongoDB\\BSON\\Timestamp',
  ),
  'up' => 
  array (
    0 => 'mongodb.bson.php',
    1 => 'MongoDB\\BSON',
  ),
  'prev' => 
  array (
    0 => 'mongodb-bson-regex.tostring.php',
    1 => 'MongoDB\\BSON\\Regex::__toString',
  ),
  'next' => 
  array (
    0 => 'mongodb-bson-timestamp.construct.php',
    1 => 'MongoDB\\BSON\\Timestamp::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'pt_BR',
    'path' => 'reference/mongodb/bson/timestamp.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.mongodb-bson-timestamp.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.mongodb-bson-timestamp" class="reference">

 <h1 class="title">A classe MongoDB\BSON\Timestamp</h1>
 

 <div class="partintro"><p class="verinfo">(mongodb &gt;=1.0.0)</p>


  <div class="section" id="mongodb-bson-timestamp.intro">
   <h2 class="title">Introdução</h2>
   <p class="para">
    Representa um
    <a href="https://www.mongodb.com/docs/manual/reference/bson-types/#timestamps" class="link external">&raquo;&nbsp;timestamp BSON</a>.
    O valor consiste em um timestamp de 4 bytes (ou seja, segundos desde a época)
    e um incremento de 4 bytes.
   </p>
   <blockquote class="note"><p><strong class="note">Nota</strong>: 
    <span class="simpara">
     Este é um tipo interno do MongoDB usado para replicação e fragmentação. Não se
     destina ao armazenamento geral de datas
     (<span class="classname"><a href="class.mongodb-bson-utcdatetime.php" class="classname">MongoDB\BSON\UTCDateTime</a></span> deve ser usado em seu lugar).
    </span>
   </p></blockquote>
  </div>


  <div class="section" id="mongodb-bson-timestamp.synopsis">
   <h2 class="title">Resumo da classe</h2>


   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>


    <div class="classsynopsisinfo">
     <span class="modifier">final</span>
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">MongoDB\BSON\Timestamp</strong>
     </span>

     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.mongodb-bson-timestampinterface.php" class="interfacename">MongoDB\BSON\TimestampInterface</a></span><span class="oointerface">,  <a href="class.mongodb-bson-type.php" class="interfacename">MongoDB\BSON\Type</a></span><span class="oointerface">,  <a href="class.jsonserializable.php" class="interfacename">JsonSerializable</a></span><span class="oointerface">,  <a href="class.stringable.php" class="interfacename">Stringable</a></span> {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Métodos */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$increment</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$timestamp</code></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.getincrement.php" class="methodname">getIncrement</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.gettimestamp.php" class="methodname">getTimestamp</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.jsonserialize.php" class="methodname">jsonSerialize</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><a href="mongodb-bson-timestamp.tostring.php" class="methodname">__toString</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

   }</div>


  </div>

  <div class="section">
   <h2 class="title">Registro de Alterações</h2>
   <p class="para">
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Versão</th>
        <th>Descrição</th>
       </tr>

      </thead>

      <tbody class="tbody">
       
       <tr>
        <td>PECL mongodb 2.0.0</td>
        <td>
         <p class="para">
          Esta classe não implementa mais a interface
          <span class="interfacename"><a href="class.serializable.php" class="interfacename">Serializable</a></span>.
         </p>
        </td>
       </tr>


       <tr>
        <td>PECL mongodb 1.12.0</td>
        <td>
         Implementa <span class="interfacename"><a href="class.stringable.php" class="interfacename">Stringable</a></span> para PHP 8.0+.
        </td>
       </tr>

       <tr>
        <td>PECL mongodb 1.3.0</td>
        <td>
         Implementa <span class="interfacename"><a href="class.mongodb-bson-timestampinterface.php" class="interfacename">MongoDB\BSON\TimestampInterface</a></span>.
        </td>
       </tr>

       <tr>
        <td>PECL mongodb 1.2.0</td>
        <td>
         Implementa <span class="interfacename"><a href="class.serializable.php" class="interfacename">Serializable</a></span> e
         <span class="interfacename"><a href="class.jsonserializable.php" class="interfacename">JsonSerializable</a></span>.
        </td>
       </tr>

      </tbody>
     
    </table>

   </p>
  </div>

 </div>

 



































<h2>Índice</h2><ul class="chunklist chunklist_reference"><li><a href="mongodb-bson-timestamp.construct.php">MongoDB\BSON\Timestamp::__construct</a> — Constr&oacute;i um novo Timestamp</li><li><a href="mongodb-bson-timestamp.getincrement.php">MongoDB\BSON\Timestamp::getIncrement</a> — Retorna o componente de incremento deste Timestamp</li><li><a href="mongodb-bson-timestamp.gettimestamp.php">MongoDB\BSON\Timestamp::getTimestamp</a> — Retorna o componente de timestamp deste Timestamp</li><li><a href="mongodb-bson-timestamp.jsonserialize.php">MongoDB\BSON\Timestamp::jsonSerialize</a> — Retorna uma representa&ccedil;&atilde;o que pode ser convertida para JSON</li><li><a href="mongodb-bson-timestamp.tostring.php">MongoDB\BSON\Timestamp::__toString</a> — Retorna a representa&ccedil;&atilde;o em string deste Timestamp</li></ul>
</div>
<?php manual_footer($setup); ?>