Skip to content

Commit d8866fa

Browse files
committed
Documented list_collections(); related fuel/core#1675
1 parent 288e849 commit d8866fa

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

classes/mongo/methods.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,51 @@ <h4 class="method" id="get_collection">get_collection($collection = "")</h4>
19721972
</table>
19731973
</article>
19741974

1975+
<article>
1976+
<h4 class="method" id="list_collections">list_collections($system_collections = false)</h4>
1977+
<p>
1978+
The <strong>list_collections</strong> method returns an array of MongoCollection objects of all collections present in the database. Optionally you can specify that you want all system collections returned too.</a>
1979+
</p>
1980+
<table class="method">
1981+
<tbody>
1982+
<tr>
1983+
<th class="legend">Static</th>
1984+
<td>No</td>
1985+
</tr>
1986+
<tr>
1987+
<th>Parameters</th>
1988+
<td>
1989+
<table class="parameters">
1990+
<tr>
1991+
<th>Param</th>
1992+
<th>Type</th>
1993+
<th>Default</th>
1994+
<th class="description">Description</th>
1995+
</tr>
1996+
<tr>
1997+
<th><kbd>system_collections</kbd></th>
1998+
<td><em>bool</em></td>
1999+
<td><pre class="php"><code>false</code></pre></td>
2000+
<td>Whether or not to include the system collections.</td>
2001+
</tr>
2002+
</table>
2003+
</td>
2004+
</tr>
2005+
<tr>
2006+
<th>Returns</th>
2007+
<td>An array of MongoCollection objects.</td>
2008+
</tr>
2009+
<tr>
2010+
<th>Example</th>
2011+
<td>
2012+
<pre class="php"><code>// Get a mongo instance
2013+
$mongodb = \Mongo_Db::instance();
2014+
$collections = $mongodb->list_collections();
2015+
</code></pre>
2016+
</tr>
2017+
</tbody>
2018+
</table>
2019+
</article>
19752020
</div>
19762021

19772022
<footer>

0 commit comments

Comments
 (0)