mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-22 11:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322123 c90b9560-bf6c-de11-be94-00142212c4b1
191 lines
5.2 KiB
XML
191 lines
5.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<phpdoc:classref xml:id="class.mongo" 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 Mongo class</title>
|
|
<titleabbrev>Mongo</titleabbrev>
|
|
|
|
<partintro>
|
|
<!-- {{{ Mongo intro -->
|
|
<section xml:id="mongo.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
A connection between PHP and MongoDB.
|
|
</para>
|
|
<para>
|
|
This class is used to create and manage connections. A typical use is:
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$m = new Mongo(); // connect
|
|
$db = $m->foo; // get the database named "foo"
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</para>
|
|
<para>
|
|
See <function>Mongo::__construct</function> and the section on
|
|
<link linkend="mongo.connecting">connecting</link> for more information
|
|
about creating connections.
|
|
</para>
|
|
</section>
|
|
<!-- }}} -->
|
|
|
|
<section xml:id="mongo.synopsis">
|
|
&reftitle.classsynopsis;
|
|
|
|
<!-- {{{ Synopsis -->
|
|
<classsynopsis>
|
|
<ooclass><classname>Mongo</classname></ooclass>
|
|
|
|
<!-- {{{ Class synopsis -->
|
|
<classsynopsisinfo>
|
|
<ooclass>
|
|
<classname>Mongo</classname>
|
|
</ooclass>
|
|
</classsynopsisinfo>
|
|
<!-- }}} -->
|
|
|
|
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>string</type>
|
|
<varname linkend="mongo.constants.version">Mongo::VERSION</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>string</type>
|
|
<varname linkend="mongo.constants.defaulthost">Mongo::DEFAULT_HOST</varname>
|
|
<initializer>"localhost"</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>const</modifier>
|
|
<type>int</type>
|
|
<varname linkend="mongo.constants.defaultport">Mongo::DEFAULT_PORT</varname>
|
|
<initializer>27017</initializer>
|
|
</fieldsynopsis>
|
|
|
|
<classsynopsisinfo role="comment">Fields</classsynopsisinfo>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>boolean</type>
|
|
<varname>connected</varname>
|
|
<initializer>&false;</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>string</type>
|
|
<varname linkend="mongo.props.status">status</varname>
|
|
<initializer>&null;</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>protected</modifier>
|
|
<type>string</type>
|
|
<varname>server</varname>
|
|
<initializer>&null;</initializer>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>protected</modifier>
|
|
<type>boolean</type>
|
|
<varname>persistent</varname>
|
|
<initializer>&null;</initializer>
|
|
</fieldsynopsis>
|
|
|
|
|
|
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
|
|
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongo')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
|
</classsynopsis>
|
|
<!-- }}} -->
|
|
|
|
</section>
|
|
|
|
<!-- Mongo constants -->
|
|
<section>
|
|
&reftitle.constants;
|
|
<section xml:id="mongo.constants.types">
|
|
<title>Mongo Constants</title>
|
|
<variablelist>
|
|
<varlistentry xml:id="mongo.constants.version">
|
|
<term><constant>Mongo::VERSION</constant></term>
|
|
<listitem>
|
|
<simpara>
|
|
PHP driver version. May be suffixed with "+" or "-" if it is in-between
|
|
versions.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="mongo.constants.defaulthost">
|
|
<term><constant>Mongo::DEFAULT_HOST</constant></term>
|
|
<term><constant>"localhost"</constant></term>
|
|
<listitem>
|
|
<simpara>
|
|
Host to connect to if no host is given.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="mongo.constants.defaultport">
|
|
<term><constant>Mongo::DEFAULT_PORT</constant></term>
|
|
<term><constant>27017</constant></term>
|
|
<listitem>
|
|
<simpara>
|
|
Port to connect to if no port is given.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</section>
|
|
</section>
|
|
|
|
<section>
|
|
<title>Fields</title>
|
|
<variablelist>
|
|
<varlistentry xml:id="mongo.props.status">
|
|
<term><varname>status</varname></term>
|
|
<listitem>
|
|
<simpara>
|
|
If this is a persistent connection, if the connection was created for
|
|
this object or is being reused. If this is not a persistent connection,
|
|
this field should be &null;.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</section>
|
|
|
|
<section>
|
|
&reftitle.seealso;
|
|
<para>
|
|
MongoDB core docs on <link xlink:href="&url.mongodb.dochub.connections;">connecting</link>.
|
|
</para>
|
|
</section>
|
|
|
|
<!-- }}} -->
|
|
</partintro>
|
|
|
|
&reference.mongo.entities.mongo;
|
|
|
|
</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
|
|
-->
|