Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 10338

php-manual-en-7.2.11-1.mga7.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 timestamp</title>

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

 </div>

 <div id="mongotimestamp.construct-soft-deprecation-notice" class="soft-deprecation-notice">
  <blockquote class="sidebar">
   <p class="para">This extension that defines this method
is deprecated. Instead, the <a href="set.mongodb.html" class="link">MongoDB</a> extension should be used.
Alternatives to this method include:</p>
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="mongodb-bson-timestamp.construct.html" class="methodname">MongoDB\BSON\Timestamp::__construct()</a></span></li>
   </ul>
  </blockquote>
 </div>

 <div class="refsect1 description" id="refsect1-mongotimestamp.construct-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>MongoTimestamp::__construct</strong></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$sec</code><span class="initializer"> = time()</span></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$inc</code></span>
  ]] )</div>

  <p class="para rdfs-comment">
   Creates a new timestamp.  If no parameters are given, the current time is 
   used and the increment is automatically provided.  The increment is set to 0
   when the module is loaded and is incremented every time this constructor is 
   called (without the $inc parameter passed in).
  </p>
 </div>


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

    
     <dt>

      <code class="parameter">sec</code>
     </dt>

     <dd>

      <p class="para">
       Number of seconds since the epoch (i.e. 1 Jan 1970 00:00:00.000 UTC).
      </p>
     </dd>

         
    
     <dt>

      <code class="parameter">inc</code>
     </dt>

     <dd>

      <p class="para">
       Increment.
      </p>
     </dd>

         
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongotimestamp.construct-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
    Returns this new timestamp.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-mongotimestamp.construct-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="mongotimestamp.tostring.html" class="methodname" rel="rdfs-seeAlso">MongoTimestamp::__toString()</a> - Returns a string representation of this timestamp</span></li>
   </ul>
  </p>
 </div>


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