New argument & similar function

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@326921 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2012-08-01 11:33:44 +00:00
parent 54bcc14fac
commit 46e6209a56
3 changed files with 137 additions and 5 deletions

View file

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="mongodb.getcollectionnames" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB::getCollectionNames</refname>
<refpurpose>Get all collections from this database</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>MongoDB::getCollectionNames</methodname>
<methodparam choice="opt"><type>bool</type><parameter>includeSystemCollections</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
Returns an array of all the collection names for the given database.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>includeSystemCollections</parameter></term>
<listitem>
<para>
Include system collections.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the names of the all the collections in the database as an <type>array</type>.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>MongoDB::getCollectionNames</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$m = new Mongo;
$collections = $m->selectDB("demo")->getCollectionNames());'
var_dump($collections);
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
array(2) {
[0]=>
string(9) "addresses"
[1]=>
string(5) "users"
}
]]>
</screen>
</example>
</refsect1>
</refentry>
<!-- 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
-->

View file

@ -4,25 +4,65 @@
<refentry xml:id="mongodb.listcollections" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB::listCollections</refname>
<refpurpose>Get a list of collections in this database</refpurpose>
<refpurpose>Get an of MongoCollection for this database</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>MongoDB::listCollections</methodname>
<void/>
<methodparam choice="opt"><type>bool</type><parameter>includeSystemCollections</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
<para>
Gets a list of all the collections in the database and returns them as an
array of <classname>MongoCollection</classname> objects.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>includeSystemCollections</parameter></term>
<listitem>
<para>
Include system collections.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a list of MongoCollections.
Returns an array of MongoCollections.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>1.3.0</entry>
<entry>
Added the <parameter>includeSystemCollections</parameter> parameter.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>

View file

@ -35,6 +35,7 @@
<function name='mongodb::getname' from='PECL mongo &gt;=0.9.0'/>
<function name='mongodb::getprofilinglevel' from='PECL mongo &gt;=0.9.0'/>
<function name='mongodb::listcollections' from='PECL mongo &gt;=0.9.0'/>
<function name='mongodb::listcollections' from='PECL mongo &gt;=1.3.0'/>
<function name='mongodb::repair' from='PECL mongo &gt;=0.9.0'/>
<function name='mongodb::selectcollection' from='PECL mongo &gt;=0.9.0'/>
<function name='mongodb::setprofilinglevel' from='PECL mongo &gt;=0.9.0'/>