php-doc-en/reference/mongo/mongotimestamp.xml
2016-02-22 12:36:13 +00:00

99 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<phpdoc:classref xml:id="class.mongotimestamp" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoTimestamp class</title>
<titleabbrev>MongoTimestamp</titleabbrev>
<partintro>
<warning>
&mongo.alternative.class.note;
<simplelist role="alternatives">
<member><classname>MongoDB\BSON\Timestamp</classname></member>
</simplelist>
</warning>
<!-- {{{ MongoTimestamp intro -->
<section xml:id="mongotimestamp.intro">
&reftitle.intro;
<para>
<classname>MongoTimestamp</classname> is an internal type used by MongoDB
for replication and sharding. It consists of a 4-byte timestamp (i.e.
seconds since the epoch) and a 4-byte increment. This type is not intended
for storing time or date values (e.g. a "createdAt" field on a document).
</para>
<note>
<simpara>
Unless you are writing an application that interacts with MongoDB's
replication oplog or sharding internals: stop, go directly to
<classname>MongoDate</classname>, do not pass go, and do not collect 200
dollars. This is not the class you are looking for.
</simpara>
</note>
</section>
<!-- }}} -->
<section xml:id="mongotimestamp.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoTimestamp</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoTimestamp</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">Fields</classsynopsisinfo>
<fieldsynopsis>
<modifier>public</modifier>
<type>int</type>
<varname>sec</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>int</type>
<varname>inc</varname>
<initializer>0</initializer>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongotimestamp')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
&reference.mongo.entities.mongotimestamp;
</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->