MongoCollection::__construct
  Creates a new collection
  
 
  Description
  
   public  MongoCollection::__construct
    ( MongoDB $db
   , string $name
   )
  
 
  Parameters
  
   
    
     - 
      MongoDB
      
db
      
     - 
      
       Parent database.
      
      
       
   
   
    
     - 
      
name
      
     - 
      
       Name for this collection.
      
      
       
   
  
  
 
  Return Values
  
   Returns a new collection object.
  
  
 
  Errors/Exceptions
  
   Throws default exception if the collection name is invalid.