title: MongoDB::listCollections not working
body: <p>Within Symfony Doctrine i'm using MongoDB as database. I need to have a list of all the collections within a database.</p>
  
  <p>I thought the method <code>ListCollections()</code> would give me these as the name and documentation suggests.
  Except this function doesn't return me anything at all.</p>
  
  <p>From Symfony PHP i'm calling the method like this:</p>
  
  <p><code>$this-&gt;get('doctrine_mongodb.odm.default_connection')-&gt;selectDatabase('database');</code></p>
  
  <p>This gives me an instance of the class <code>Doctrine\MongoDB\Database</code>
  This class has the function <code>listCollection()</code> as stated below:</p>
  
  <pre><code>/**
   * Wrapper method for MongoDB::listCollections().
   *
   * @see http://php.net/manual/en/mongodb.listcollections.php
   * @return array
   */
  public function listCollections()
  {
      return $this-&gt;mongoDB-&gt;listCollections();
  }
  </code></pre>
  
  <p>As the documentation would suggest this function should return an array which it does (yet it's empty even tho there are collections within my database).</p>
  
  <p>So I moved deeper and looked at the documentation of <code>listCollections()</code> of the mongo pecl plugin which states:   </p>
  
  <pre><code>/**
   * (PECL mongo &gt;= 0.9.0)&lt;br/&gt;
   * Get a list of collections in this database
   * @link http://www.php.net/manual/en/mongodb.listcollections.php
   * @param bool $includeSystemCollections [optional] &lt;p&gt;Include system collections.&lt;/p&gt;
   * @return array Returns a list of MongoCollections.
   */
   public function listCollections($includeSystemCollections = false) {}
  </code></pre>
  
  <p>How would one get all the collection names within one database within Symfony 3.0.6?</p>
  
  <p>Some critical details:</p>
  
  <ul>
  <li>Mongo version: 1.5.5 </li>
  <li>Symfony version: 3.0.6 </li>
  <li>MongoDB shell version: 3.2.4</li>
  </ul>