# php_manual

id: MongoCollection::parallelCollectionScan
type: function
doc:
<comment>Description:</comment>
  Returns an array of cursors to iterator over a full collection in parallel
  
  This method returns an array of a maximum of <return>num_cursors</return> cursors. An iteration over one of the
  returned cursors results in a partial set of documents for a collection. Iteration over all the
  returned cursors results in getting every document back from the collection.
  
  This method is a wrapper for the <return>parallelCollectionScan</return> MongoDB command.

<comment>Param:</comment>
  <info>int</info>  <strong>$num_cursors</strong>  The number of cursors to request from the server. Please note, that the server
                     can return less cursors than you requested.

<comment>Return:</comment>
  <info>array[MongoCommandCursor]</info>  Returns an array of <class>MongoCommandCursor</class> objects.

<comment>See Also:</comment>
   * <class>MultipleIterator</class>
   * <class>MongoCommandCursor</class>
   * MongoDB::command


id: MongoCollection::remove
type: function
doc:
<comment>Description:</comment>
  Remove records from this collection

<comment>Param:</comment>
  <info>array</info>  <strong>$criteria</strong>  Query criteria for the documents to delete.
  <info>array</info>  <strong>$options </strong>  An array of options for the remove operation. Currently available options
                    include: <return>"w"</return>Vedeți
                    WriteConcerns. Valoarea implicită
                    pentru <class>MongoClient</class> este <return>1</return>.<return>"justOne"</return> Specify <info>true</info> to limit deletion to just one
                    document. If <info>false</info> or omitted, all documents matching the criteria will be
                    deleted. <return>"fsync"</return>O valoare boolean-ă, valoarea
                    implicită este <info>false</info>. Dacă jurnalizarea e activată, ea funcționează exact ca
                    <return>"j"</return>. Dacă jurnalizarea nu este acticvată, atunci se forțează
                    sincronizarea pe disc a operațiunii de inserare înainte de a întoarce succes.
                    Dacă are valoarea <info>true</info>, se presupune efectuarea
                    unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                    <return>0</return>.Dacă jurnalizarea este activată, utilizatorii sunt încurajați să
                    utilizeze opțiunea <return>"j"</return> în loc de <return>"fsync"</return>.
                    Nu utilizați <return>"fsync"</return> și <return>"j"</return> simultan,
                    deoarece aceasta va rezulta în eroare.<return>"j"</return>O valoare boolean-ă, cu valoarea
                    implicită <info>false</info>. Forțează sincronizarea cu jurnalul a operațiunii de inserare,
                    înainte de a întoarce succes. Dacă are valoarea <info>true</info>, se presupune efectuarea
                    unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                    <return>0</return>.Dacă această opțiune e utilizată, iar jurnalizarea e dezactivată,
                    MongoDB 2.6+ va emite o eroare și înscrierea va eșua; versiunile mai vechi ale
                    serverului pur și simplu vor ignora opțiunea.<return>"socketTimeoutMS"</return>Această opțiune
                    specifică
                    limita de timp în milisecunde pentru comunicarea prin socket. Dacă serverul nu
                    răspunde în limita intervalului de timp, se va emite o
                    <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                    de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                    <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                    nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                    <return>30000</return> (30 secunde).<return>"w"</return>Vedeți
                    WriteConcerns. Valoarea implicită
                    pentru <class>MongoClient</class> este <return>1</return>.<return>"wTimeoutMS"</return>Această opțiune specifică
                    limita de timp în milisecunde pentru confirmarea
                    write concern. Aceasta este aplicabilă
                    doar atunci când <return>"w"</return> este mai mare decât <return>1</return>,
                    deoarece expirarea timpului ține de replicare. Dacă "write concern" nu este
                    satisfăcută în limita intervalului de timp, se va emite o <class>MongoCursorException</class>.
                    Valoarea <return>0</return> poate fi specificată pentru a suspenda pentru o
                    perioadă nedefinită. Valoarea implicită pentru <class>MongoClient</class>
                    este <return>10000</return> (zece secunde).
                    
                    <return>"w"</return>
                    
                    Vedeți
                    WriteConcerns. Valoarea implicită
                    pentru <class>MongoClient</class> este <return>1</return>.
                    
                    <return>"justOne"</return>
                    
                    Specify <info>true</info> to limit deletion to just one document. If <info>false</info> or omitted, all
                    documents matching the criteria will be deleted.
                    
                    <return>"fsync"</return>
                    
                    O valoare boolean-ă, valoarea
                    implicită este <info>false</info>. Dacă jurnalizarea e activată, ea funcționează exact ca
                    <return>"j"</return>. Dacă jurnalizarea nu este acticvată, atunci se forțează
                    sincronizarea pe disc a operațiunii de inserare înainte de a întoarce succes.
                    Dacă are valoarea <info>true</info>, se presupune efectuarea
                    unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                    <return>0</return>.
                    
                    Dacă jurnalizarea este activată, utilizatorii sunt încurajați să
                    utilizeze opțiunea <return>"j"</return> în loc de <return>"fsync"</return>.
                    Nu utilizați <return>"fsync"</return> și <return>"j"</return> simultan,
                    deoarece aceasta va rezulta în eroare.
                    
                    <return>"j"</return>
                    
                    O valoare boolean-ă, cu valoarea
                    implicită <info>false</info>. Forțează sincronizarea cu jurnalul a operațiunii de inserare,
                    înainte de a întoarce succes. Dacă are valoarea <info>true</info>, se presupune efectuarea
                    unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                    <return>0</return>.
                    
                    Dacă această opțiune e utilizată, iar jurnalizarea e dezactivată,
                    MongoDB 2.6+ va emite o eroare și înscrierea va eșua; versiunile mai vechi ale
                    serverului pur și simplu vor ignora opțiunea.
                    
                    <return>"socketTimeoutMS"</return>
                    
                    Această opțiune specifică
                    limita de timp în milisecunde pentru comunicarea prin socket. Dacă serverul nu
                    răspunde în limita intervalului de timp, se va emite o
                    <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                    de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                    <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                    nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                    <return>30000</return> (30 secunde).
                    
                    <return>"w"</return>
                    
                    Vedeți
                    WriteConcerns. Valoarea implicită
                    pentru <class>MongoClient</class> este <return>1</return>.
                    
                    <return>"wTimeoutMS"</return>
                    
                    Această opțiune specifică
                    limita de timp în milisecunde pentru confirmarea
                    write concern. Aceasta este aplicabilă
                    doar atunci când <return>"w"</return> este mai mare decât <return>1</return>,
                    deoarece expirarea timpului ține de replicare. Dacă "write concern" nu este
                    satisfăcută în limita intervalului de timp, se va emite o <class>MongoCursorException</class>.
                    Valoarea <return>0</return> poate fi specificată pentru a suspenda pentru o
                    perioadă nedefinită. Valoarea implicită pentru <class>MongoClient</class>
                    este <return>10000</return> (zece secunde).
                    
                    The following options are deprecated and should no longer be used:
                    <return>"safe"</return>Învechită. Utilizați opțiunea
                    WriteConcern
                    <return>w</return>.<return>"timeout"</return>Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.<return>"wtimeout"</return>Un pseudonim
                    învechit pentru
                    <return>"wTimeoutMS"</return>.
                    
                    <return>"safe"</return>
                    
                    Învechită. Utilizați opțiunea
                    WriteConcern
                    <return>w</return>.
                    
                    <return>"timeout"</return>
                    
                    Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.
                    
                    <return>"wtimeout"</return>
                    
                    Un pseudonim învechit pentru
                    <return>"wTimeoutMS"</return>.

<comment>Return:</comment>
  <info>boolarray</info>  Returns an array containing the status of the removal if the <return>"w"</return> option is set.
             Otherwise, returns <info>true</info>.
             
             Fields in the status array are described in the documentation for
             <strong>MongoCollection::insert()</strong>.

<comment>See Also:</comment>
   * <strong>MongoCollection::insert()</strong>
   * <strong>MongoCollection::update()</strong>
   * MongoDB core docs on remove.


id: MongoCollection::save
type: function
doc:
<comment>Description:</comment>
  Saves a document to this collection
  
  If the object is from the database, update the existing database object, otherwise  insert this
  object.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$document</strong>  Array or object to save. If an object is used, it may not have protected
                          or private properties.
                          
                          If the parameter does not have an <return>_id</return> key or property, a new <class>MongoId</class>
                          instance will be created and assigned to it. See <strong>MongoCollection::insert()</strong>
                          for additional information on this behavior.
  <info>array      </info>  <strong>$options </strong>  Options for the save. <return>"fsync"</return>O valoare boolean-ă, valoarea
                          implicită este <info>false</info>. Dacă jurnalizarea e activată, ea funcționează exact
                          ca
                          <return>"j"</return>. Dacă jurnalizarea nu este acticvată, atunci se forțează
                          sincronizarea pe disc a operațiunii de inserare înainte de a întoarce
                          succes.
                          Dacă are valoarea <info>true</info>, se presupune efectuarea
                          unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                          <return>0</return>.Dacă jurnalizarea este activată, utilizatorii sunt încurajați să
                          utilizeze opțiunea <return>"j"</return> în loc de <return>"fsync"</return>.
                          Nu utilizați <return>"fsync"</return> și <return>"j"</return> simultan,
                          deoarece aceasta va rezulta în eroare.<return>"j"</return>O valoare boolean-ă, cu valoarea
                          implicită <info>false</info>. Forțează sincronizarea cu jurnalul a operațiunii de
                          inserare,
                          înainte de a întoarce succes. Dacă are valoarea <info>true</info>, se presupune
                          efectuarea
                          unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                          <return>0</return>.Dacă această opțiune e utilizată, iar jurnalizarea e dezactivată,
                          MongoDB 2.6+ va emite o eroare și înscrierea va eșua; versiunile mai vechi
                          ale
                          serverului pur și simplu vor ignora opțiunea.<return>"socketTimeoutMS"</return>Această
                          opțiune specifică
                          limita de timp în milisecunde pentru comunicarea prin socket. Dacă
                          serverul nu
                          răspunde în limita intervalului de timp, se va emite o
                          <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                          de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                          <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                          nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                          <return>30000</return> (30 secunde).<return>"w"</return>Vedeți
                          WriteConcerns. Valoarea implicită
                          pentru <class>MongoClient</class> este <return>1</return>.<return>"wtimeout"</return>Un pseudonim învechit pentru
                          <return>"wTimeoutMS"</return>.<return>"wTimeoutMS"</return>Această opțiune specifică
                          limita de timp în milisecunde pentru confirmarea
                          write concern. Aceasta este aplicabilă
                          doar atunci când <return>"w"</return> este mai mare decât <return>1</return>,
                          deoarece expirarea timpului ține de replicare. Dacă "write concern" nu
                          este
                          satisfăcută în limita intervalului de timp, se va emite o
                          <class>MongoCursorException</class>.
                          Valoarea <return>0</return> poate fi specificată pentru a suspenda pentru o
                          perioadă nedefinită. Valoarea implicită pentru <class>MongoClient</class>
                          este <return>10000</return> (zece secunde).<return>"safe"</return>Învechită. Utilizați opțiunea
                          WriteConcern
                          <return>w</return>.<return>"timeout"</return>Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.
                          
                          <return>"fsync"</return>
                          
                          O valoare boolean-ă, valoarea
                          implicită este <info>false</info>. Dacă jurnalizarea e activată, ea funcționează exact
                          ca
                          <return>"j"</return>. Dacă jurnalizarea nu este acticvată, atunci se forțează
                          sincronizarea pe disc a operațiunii de inserare înainte de a întoarce
                          succes.
                          Dacă are valoarea <info>true</info>, se presupune efectuarea
                          unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                          <return>0</return>.
                          
                          Dacă jurnalizarea este activată, utilizatorii sunt încurajați să
                          utilizeze opțiunea <return>"j"</return> în loc de <return>"fsync"</return>.
                          Nu utilizați <return>"fsync"</return> și <return>"j"</return> simultan,
                          deoarece aceasta va rezulta în eroare.
                          
                          <return>"j"</return>
                          
                          O valoare boolean-ă, cu valoarea
                          implicită <info>false</info>. Forțează sincronizarea cu jurnalul a operațiunii de
                          inserare,
                          înainte de a întoarce succes. Dacă are valoarea <info>true</info>, se presupune
                          efectuarea
                          unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                          <return>0</return>.
                          
                          Dacă această opțiune e utilizată, iar jurnalizarea e dezactivată,
                          MongoDB 2.6+ va emite o eroare și înscrierea va eșua; versiunile mai vechi
                          ale
                          serverului pur și simplu vor ignora opțiunea.
                          
                          <return>"socketTimeoutMS"</return>
                          
                          Această opțiune specifică
                          limita de timp în milisecunde pentru comunicarea prin socket. Dacă
                          serverul nu
                          răspunde în limita intervalului de timp, se va emite o
                          <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                          de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                          <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                          nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                          <return>30000</return> (30 secunde).
                          
                          <return>"w"</return>
                          
                          Vedeți
                          WriteConcerns. Valoarea implicită
                          pentru <class>MongoClient</class> este <return>1</return>.
                          
                          <return>"wtimeout"</return>
                          
                          Un pseudonim învechit pentru
                          <return>"wTimeoutMS"</return>.
                          
                          <return>"wTimeoutMS"</return>
                          
                          Această opțiune specifică
                          limita de timp în milisecunde pentru confirmarea
                          write concern. Aceasta este aplicabilă
                          doar atunci când <return>"w"</return> este mai mare decât <return>1</return>,
                          deoarece expirarea timpului ține de replicare. Dacă "write concern" nu
                          este
                          satisfăcută în limita intervalului de timp, se va emite o
                          <class>MongoCursorException</class>.
                          Valoarea <return>0</return> poate fi specificată pentru a suspenda pentru o
                          perioadă nedefinită. Valoarea implicită pentru <class>MongoClient</class>
                          este <return>10000</return> (zece secunde).
                          
                          <return>"safe"</return>
                          
                          Învechită. Utilizați opțiunea
                          WriteConcern
                          <return>w</return>.
                          
                          <return>"timeout"</return>
                          
                          Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.

<comment>Return:</comment>
  <info>mixed</info>  If <strong>$w</strong> was set, returns an array containing the status of the save. Otherwise, returns a
         boolean representing if the array was not empty (an empty array will not  be inserted).


id: MongoCollection::setReadPreference
type: function
doc:
<comment>Description:</comment>
  Set the read preference for this collection

<comment>Param:</comment>
  <info>string</info>  <strong>$read_preference</strong>  Modul preferinței de citire:
                            <info>MongoClient::RP_PRIMARY</info>,
                            <info>MongoClient::RP_PRIMARY_PREFERRED</info>,
                            <info>MongoClient::RP_SECONDARY</info>,
                            <info>MongoClient::RP_SECONDARY_PREFERRED</info> sau
                            <info>MongoClient::RP_NEAREST</info>.
  <info>array </info>  <strong>$tags           </strong>  Un tablou din zero sau mai multe seturi de etichete, unde fiecare
                            set de etichete este la rândul său un tablou de criterii utilizate
                            pentru a
                            potrivi etichetele pe membrii setului de replicare.

<comment>Return:</comment>
  <info>bool</info>  Întoarce <info>true</info> în caz de succes, sau <info>false</info> în caz contrar.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCollection::getReadPreference()</strong>


id: MongoCollection::setSlaveOkay
type: function
doc:
<comment>Description:</comment>
  Change slaveOkay setting for this collection
  
  See the query section of this manual for information on distributing reads to secondaries.

<comment>Param:</comment>
  <info>bool</info>  <strong>$ok</strong>  If reads should be sent to secondary members of a replica set for all  possible queries
             using this <class>MongoCollection</class>  instance.

<comment>Return:</comment>
  <info>bool</info>  Returns the former value of slaveOkay for this instance.

<comment>See Also:</comment>
   * 
   * MongoCollection::setReadPreference


id: MongoCollection::setWriteConcern
type: function
doc:
<comment>Description:</comment>
  Set the write concern for this database

<comment>Param:</comment>
  <info>mixed</info>  <strong>$w       </strong>  Gradul de participare la înscriere. Aceasta poate fi un întreg
                    ce denotă numărul de servere necesare pentru a confirma operațiunea de
                    înscriere,
                    sau un mod scris ca șir de caractere (de ex. "majority").
  <info>int  </info>  <strong>$wtimeout</strong>  Numărul maximal de milisecunde de așteptare până când serverul
                    satisface gradul de participare la înscriere.

<comment>Return:</comment>
  <info>bool</info>  Întoarce <info>true</info> în caz de succes, sau <info>false</info> în caz contrar.

<comment>See Also:</comment>
   * The write concern documentation.
   * <strong>MongoCollection::getWriteConcern()</strong>


id: MongoCollection::toIndexString
type: function
doc:
<comment>Description:</comment>
  Converts keys specifying an index to its identifying string
  
  This method is deprecated since version 1.5.0.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$keys</strong>  Field or fields to convert to the identifying string

<comment>Return:</comment>
  <info>string</info>  Returns a string that describes the index.


id: MongoCollection::update
type: function
doc:
<comment>Description:</comment>
  Update records based on a given criteria

<comment>Param:</comment>
  <info>array</info>  <strong>$criteria  </strong>  Query criteria for the documents to update.
  <info>array</info>  <strong>$new_object</strong>  The object used to update the matched documents. This may either contain
                      update operators (for modifying specific fields) or be a replacement document.
  <info>array</info>  <strong>$options   </strong>  An array of options for the update operation. Currently available options
                      include: <return>"upsert"</return> If no document matches <strong>$criteria</strong>, a new document will be
                      inserted.  If a new document would be inserted and <strong>$new_object</strong> contains atomic
                      modifiers (i.e. <return>$</return> operators), those operations will be applied to the
                      <strong>$criteria</strong> parameter to create the new document. If <strong>$new_object</strong> does not
                      contain atomic modifiers, it will be used as-is for the inserted document. See
                      the upsert examples below for more information. <return>"multiple"</return> All documents
                      matching $criteria will be updated.   <strong>MongoCollection::update()</strong> has exactly
                      the opposite  behavior of <strong>MongoCollection::remove()</strong>: it updates  one document
                      by default, not all matching documents.  It is  recommended that you always
                      specify whether you want to update  multiple documents or a single document,
                      as the database  may change its default behavior at some point in the future.
                      <return>"fsync"</return>O valoare boolean-ă, valoarea
                      implicită este <info>false</info>. Dacă jurnalizarea e activată, ea funcționează exact ca
                      <return>"j"</return>. Dacă jurnalizarea nu este acticvată, atunci se forțează
                      sincronizarea pe disc a operațiunii de inserare înainte de a întoarce succes.
                      Dacă are valoarea <info>true</info>, se presupune efectuarea
                      unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                      <return>0</return>.Dacă jurnalizarea este activată, utilizatorii sunt încurajați să
                      utilizeze opțiunea <return>"j"</return> în loc de <return>"fsync"</return>.
                      Nu utilizați <return>"fsync"</return> și <return>"j"</return> simultan,
                      deoarece aceasta va rezulta în eroare.<return>"j"</return>O valoare boolean-ă, cu valoarea
                      implicită <info>false</info>. Forțează sincronizarea cu jurnalul a operațiunii de inserare,
                      înainte de a întoarce succes. Dacă are valoarea <info>true</info>, se presupune efectuarea
                      unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                      <return>0</return>.Dacă această opțiune e utilizată, iar jurnalizarea e dezactivată,
                      MongoDB 2.6+ va emite o eroare și înscrierea va eșua; versiunile mai vechi ale
                      serverului pur și simplu vor ignora opțiunea.<return>"socketTimeoutMS"</return>Această opțiune
                      specifică
                      limita de timp în milisecunde pentru comunicarea prin socket. Dacă serverul nu
                      răspunde în limita intervalului de timp, se va emite o
                      <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                      de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                      <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                      nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                      <return>30000</return> (30 secunde).<return>"w"</return>Vedeți
                      WriteConcerns. Valoarea implicită
                      pentru <class>MongoClient</class> este <return>1</return>.<return>"wTimeoutMS"</return>Această opțiune specifică
                      limita de timp în milisecunde pentru confirmarea
                      write concern. Aceasta este aplicabilă
                      doar atunci când <return>"w"</return> este mai mare decât <return>1</return>,
                      deoarece expirarea timpului ține de replicare. Dacă "write concern" nu este
                      satisfăcută în limita intervalului de timp, se va emite o
                      <class>MongoCursorException</class>.
                      Valoarea <return>0</return> poate fi specificată pentru a suspenda pentru o
                      perioadă nedefinită. Valoarea implicită pentru <class>MongoClient</class>
                      este <return>10000</return> (zece secunde).
                      
                      <return>"upsert"</return>
                      
                      If no document matches <strong>$criteria</strong>, a new document will be inserted.
                      
                      If a new document would be inserted and <strong>$new_object</strong> contains atomic modifiers
                      (i.e. <return>$</return> operators), those operations will be applied to the <strong>$criteria</strong>
                      parameter to create the new document. If <strong>$new_object</strong> does not contain atomic
                      modifiers, it will be used as-is for the inserted document. See the upsert
                      examples below for more information.
                      
                      <return>"multiple"</return>
                      
                      All documents matching $criteria will be updated.   <strong>MongoCollection::update()</strong>
                      has exactly the opposite  behavior of <strong>MongoCollection::remove()</strong>: it updates
                      one document by default, not all matching documents.  It is  recommended that
                      you always specify whether you want to update  multiple documents or a single
                      document, as the database  may change its default behavior at some point in
                      the future.
                      
                      <return>"fsync"</return>
                      
                      O valoare boolean-ă, valoarea
                      implicită este <info>false</info>. Dacă jurnalizarea e activată, ea funcționează exact ca
                      <return>"j"</return>. Dacă jurnalizarea nu este acticvată, atunci se forțează
                      sincronizarea pe disc a operațiunii de inserare înainte de a întoarce succes.
                      Dacă are valoarea <info>true</info>, se presupune efectuarea
                      unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                      <return>0</return>.
                      
                      Dacă jurnalizarea este activată, utilizatorii sunt încurajați să
                      utilizeze opțiunea <return>"j"</return> în loc de <return>"fsync"</return>.
                      Nu utilizați <return>"fsync"</return> și <return>"j"</return> simultan,
                      deoarece aceasta va rezulta în eroare.
                      
                      <return>"j"</return>
                      
                      O valoare boolean-ă, cu valoarea
                      implicită <info>false</info>. Forțează sincronizarea cu jurnalul a operațiunii de inserare,
                      înainte de a întoarce succes. Dacă are valoarea <info>true</info>, se presupune efectuarea
                      unei inserări cu confirmare și setarea <return>w</return> va fi modificată în
                      <return>0</return>.
                      
                      Dacă această opțiune e utilizată, iar jurnalizarea e dezactivată,
                      MongoDB 2.6+ va emite o eroare și înscrierea va eșua; versiunile mai vechi ale
                      serverului pur și simplu vor ignora opțiunea.
                      
                      <return>"socketTimeoutMS"</return>
                      
                      Această opțiune specifică
                      limita de timp în milisecunde pentru comunicarea prin socket. Dacă serverul nu
                      răspunde în limita intervalului de timp, se va emite o
                      <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                      de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                      <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                      nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                      <return>30000</return> (30 secunde).
                      
                      <return>"w"</return>
                      
                      Vedeți
                      WriteConcerns. Valoarea implicită
                      pentru <class>MongoClient</class> este <return>1</return>.
                      
                      <return>"wTimeoutMS"</return>
                      
                      Această opțiune specifică
                      limita de timp în milisecunde pentru confirmarea
                      write concern. Aceasta este aplicabilă
                      doar atunci când <return>"w"</return> este mai mare decât <return>1</return>,
                      deoarece expirarea timpului ține de replicare. Dacă "write concern" nu este
                      satisfăcută în limita intervalului de timp, se va emite o
                      <class>MongoCursorException</class>.
                      Valoarea <return>0</return> poate fi specificată pentru a suspenda pentru o
                      perioadă nedefinită. Valoarea implicită pentru <class>MongoClient</class>
                      este <return>10000</return> (zece secunde).
                      
                      The following options are deprecated and should no longer be used:
                      <return>"safe"</return>Învechită. Utilizați opțiunea
                      WriteConcern
                      <return>w</return>.<return>"timeout"</return>Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.<return>"wtimeout"</return>Un
                      pseudonim învechit pentru
                      <return>"wTimeoutMS"</return>.
                      
                      <return>"safe"</return>
                      
                      Învechită. Utilizați opțiunea
                      WriteConcern
                      <return>w</return>.
                      
                      <return>"timeout"</return>
                      
                      Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.
                      
                      <return>"wtimeout"</return>
                      
                      Un pseudonim învechit pentru
                      <return>"wTimeoutMS"</return>.

<comment>Return:</comment>
  <info>boolarray</info>  Returns an array containing the status of the update if the <return>"w"</return> option is set.
             Otherwise, returns <info>true</info>.
             
             Fields in the status array are described in the documentation for
             <strong>MongoCollection::insert()</strong>.


id: MongoCollection::validate
type: function
doc:
<comment>Description:</comment>
  Validates this collection

<comment>Param:</comment>
  <info>bool</info>  <strong>$scan_data</strong>  Only validate indices, not the base collection.

<comment>Return:</comment>
  <info>array</info>  Returns the database's evaluation of this object.


id: MongoCommandCursor
type: class
doc:
<comment>Description:</comment>
  A command cursor is similar to a <class>MongoCursor</class> except that you use it for iterating through the
  results of a database command instead of a normal query. Command cursors are useful for iterating
  over large result sets that might exceed the document size limit (currently 16MB) of a single
  <strong>MongoDB::command()</strong> response.
  
  While you can create command cursors using <strong>MongoCommandCursor::__construct()</strong> or the
  <strong>MongoCommandCursor::createFromDocument()</strong> factory method, you will generally want to use
  command-specific helpers such as <strong>MongoCollection::aggregateCursor()</strong>.
  
  Note that the cursor does not "contain" the database command's results; it just manages iteration
  through them. Thus, if you print a cursor (f.e. with <strong>var_dump()</strong> or <strong>print_r()</strong>), you will see the
  cursor object but not the result documents.


id: MongoCommandCursor::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new command cursor
  
  Generally, you should not have to construct a <class>MongoCommandCursor</class> manually, as there are helper
  functions such as MongoCollection::aggregateCursor and MongoCollection::parallelCollectionScan;
  however, if the server introduces new commands that can return cursors, this constructor will be
  useful in the absence of specific helper methods. You may also consider using
  MongoCommandCursor::createFromDocument.

<comment>Param:</comment>
  <info>MongoClient</info>  <strong>$connection</strong>  Database connection.
  <info>string     </info>  <strong>$ns        </strong>  Full name of the database and collection (e.g. <return>"test.foo"</return>)
  <info>array      </info>  <strong>$command   </strong>  Database command.

<comment>Return:</comment>
  <info>unknown</info>  Returns the new cursor.

<comment>See Also:</comment>
   * <strong>MongoCommandCursor::createFromDocument()</strong>
   * <strong>MongoCollection::aggregateCursor()</strong>
   * <strong>MongoCollection::parallelCollectionScan()</strong>


id: MongoCommandCursor::batchSize
type: function
doc:
<comment>Description:</comment>
  Limits the number of elements returned in one batch
  
  A cursor typically fetches a batch of result objects and store them locally. This method sets the
  batchSize value to configure the amount of documents retrieved from the server in one round trip.

<comment>Param:</comment>
  <info>int</info>  <strong>$batchSize</strong>  The number of results to return per batch. Each batch requires a round-trip to
                   the server.
                   
                   This cannot override MongoDB's limit on the amount of data it will return to  the
                   client (i.e., if you set batch size to 1,000,000,000, MongoDB will still  only
                   return 4-16MB of results per batch).

<comment>Return:</comment>
  <info>MongoCommandCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * MongoCursorInterface::batchSize


id: MongoCommandCursor::createFromDocument
type: function
doc:
<comment>Description:</comment>
  Create a new command cursor from an existing command response document
  
  Use this method if you have a raw command result with cursor information in it. Note that cursors
  created with this method cannot be iterated multiple times, as they will lack the original command
  necessary for re-execution.

<comment>Param:</comment>
  <info>MongoClient</info>  <strong>$connection</strong>  Database connection.
  <info>string     </info>  <strong>$hash      </strong>  The connection hash, as obtained through the third by-reference argument
                            to MongoDB::command.
  <info>array      </info>  <strong>$document  </strong>  Document with cursor information in it. This document needs to contain
                            the <return>id</return>, <return>ns</return> and <return>firstBatch</return> fields. Such a document is obtained by calling
                            the MongoDB::command with appropriate arguments to return a cursor, and
                            not just an inline result. See the example below.

<comment>Return:</comment>
  <info>MongoCommandCursor</info>  Returns the new cursor.

<comment>See Also:</comment>
   * <strong>MongoCommandCursor::__construct()</strong>


id: MongoCommandCursor::current
type: function
doc:
<comment>Description:</comment>
  Returns the current element
  
  This returns <info>null</info> until <strong>MongoCommandCursor::rewind()</strong> is called.

<comment>Return:</comment>
  <info>array</info>  The current result document as an associative array. <info>null</info> will be returned if there is no
         result.

<comment>See Also:</comment>
   * Iterator::current


id: MongoCommandCursor::dead
type: function
doc:
<comment>Description:</comment>
  Checks if there are results that have not yet been sent from the database
  
  This method checks whether the <class>MongoCommandCursor</class> cursor has been exhausted and the database has
  no more results to send to the client. A cursor being "dead" does not necessarily mean that there
  are no more results available for iteration.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if there are more results that have not yet been sent to the client, and <info>false</info>
        otherwise.

<comment>See Also:</comment>
   * MongoCursorInterface::dead


id: MongoCommandCursor::getReadPreference
type: function
doc:
<comment>Description:</comment>
  Get the read preference for this command

<comment>Return:</comment>
  <info>array</info>  Această funcție întoarce un tablou ce descrie preferința de citire. Tabloul
         conține tipul (<return>type</return>) valorilor pentru șirul cu modul
         preferinței de citire (ce corespunde constantelor <class>MongoClient</class>),
         și <return>tagsets</return> conținând lista tuturor criteriilor setului de
         etichete. Dacă nu a fost specificat nici un set de etichete, <return>tagsets</return>
         nu va fi prezent în tablou.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCommandCursor::setReadPreference()</strong>
   * <strong>MongoCursorInterface::getReadPreference()</strong>


id: MongoCommandCursor::info
type: function
doc:
<comment>Description:</comment>
  Gets information about the cursor's creation and iteration
  
  This can be called before or after the cursor has started iterating.

<comment>Return:</comment>
  <info>array</info>  Returns the namespace, batch size, limit, skip, flags, query, and projected fields for this
         cursor. If the cursor has started iterating, additional information about iteration and the
         connection will be included.

<comment>See Also:</comment>
   * MongoCursorInterface::info


id: MongoCommandCursor::key
type: function
doc:
<comment>Description:</comment>
  Returns the current result's index within the result set

<comment>Return:</comment>
  <info>int</info>  The current result's index within the result set.

<comment>See Also:</comment>
   * Iterator::key


id: MongoCommandCursor::next
type: function
doc:
<comment>Description:</comment>
  Advances the cursor to the next result

<comment>Return:</comment>
  <info>void</info>  <info>null</info>.

<comment>See Also:</comment>
   * Iterator::next


id: MongoCommandCursor::rewind
type: function
doc:
<comment>Description:</comment>
  Executes the command and resets the cursor to the start of the result set
  
  If the cursor has already started iteration, the command will be re-executed.

<comment>Return:</comment>
  <info>array</info>  The raw server result document.

<comment>See Also:</comment>
   * Iterator::rewind


id: MongoCommandCursor::setReadPreference
type: function
doc:
<comment>Description:</comment>
  Set the read preference for this command

<comment>Param:</comment>
  <info>string</info>  <strong>$read_preference</strong>  Modul preferinței de citire:
                            <info>MongoClient::RP_PRIMARY</info>,
                            <info>MongoClient::RP_PRIMARY_PREFERRED</info>,
                            <info>MongoClient::RP_SECONDARY</info>,
                            <info>MongoClient::RP_SECONDARY_PREFERRED</info> sau
                            <info>MongoClient::RP_NEAREST</info>.
  <info>array </info>  <strong>$tags           </strong>  Un tablou din zero sau mai multe seturi de etichete, unde fiecare
                            set de etichete este la rândul său un tablou de criterii utilizate
                            pentru a
                            potrivi etichetele pe membrii setului de replicare.

<comment>Return:</comment>
  <info>MongoCommandCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCommandCursor::getReadPreference()</strong>
   * <strong>MongoCursorInterface::setReadPreference()</strong>


id: MongoCommandCursor::timeout
type: function
doc:
<comment>Description:</comment>
  Sets a client-side timeout for this command
  
  A timeout can be set at any time and will affect subsequent data retrieval associated with this
  cursor, including fetching more results from the database.

<comment>Param:</comment>
  <info>int</info>  <strong>$ms</strong>  The number of milliseconds for the cursor to wait for a response. Use <return>-1</return> to wait
            forever. By default, the cursor will wait 30000 milliseconds (30 seconds).

<comment>Return:</comment>
  <info>MongoCommandCursor</info>  This cursor.

<comment>See Also:</comment>
   * <strong>MongoCollection::aggregateCursor()</strong>
   * MongoCursorInterface::timeout
   * The <return>socketTimeoutMS</return> option for <strong>MongoClient::__construct()</strong>


id: MongoCommandCursor::valid
type: function
doc:
<comment>Description:</comment>
  Checks if the cursor is reading a valid result

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> if the current result is not null, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * Iterator::valid


id: MongoConnectionException
type: class
doc:
<comment>Description:</comment>
  Thrown when the driver fails to connect to the database.
  
  There are a number of possible error messages to help you diagnose the  connection problem.  These
  are:
  
  <return>No candidate servers found</return>
  
  Thrown when the driver cannot establish a connection to MongoDB (fulfilling the ReadPreferences,
  if specified).
  
  <return>No server name given.</return>
  
  This error occurs if you pass in "" as the server name,  probably because of an typo with string
  interpolation,  e.g., "$servr" instead of "$server".
  
  <return> failed to get host [hostname] or port [portnum]  from [server]. </return>
  
  This indicated that the server string was malformed.   "[hostname]" and "[portnum]" will be as
  much as the  driver could dicipher of it.
  
  <return>Operation in progress</return>
  
  Connecting to the database timed out.
  
  <return>Transport endpoint is not connected</return>
  
  Generally means that the connection string isn't correct, the driver couldn't even find the
  database server.
  
  <return>couldn't determine master</return>
  
  No server in a replica set connection was identified as the primary.
  
  <return>couldn't get host info for [server]</return>
  
  This indicated that DNS could not resolve the server address  you gave.  This could easily be
  caused by a typo, for example,  "server" instead of "$server".
  
  <return>Invalid Argument</return>
  
  This can be caused by attempting to connect to a machine that is up but that the database isn't
  actually running on.  Make sure that you've started the database server before connecting.
  
  <return>Permission denied</return>
  
  This means that the socket could not be opened due to permissions issues. On Red Hat variants,
  this can be caused by a default setting that does not allow Apache to create network connections.
  You can override this setting by running:  then restarting Apache.
  
  If the error message is not listed above, it is probably an error  from the C socket, and you can
  search the web for its usual cause.


id: MongoCursor
type: class
doc:
<comment>Description:</comment>
  A cursor is used to iterate through the results of a database query.  For  example, to query the
  database and see all results, you could do: <class>MongoCursor</class> basic usagefind();
  var_dump(iterator_to_array($cursor));
  
  ?>
  ]]>
  
  You don't generally create cursors using the  <class>MongoCursor</class> constructor, you get a new cursor by
  calling <strong>MongoCollection::find()</strong> (as shown above).
  
  Suppose that, in the example above, <return>$collection</return> was a 50GB collection.  We certainly wouldn't want
  to load that into memory all  at once, which is what a cursor is for: allowing the client to
  access the  collection in dribs and drabs.
  
  If we have a large result set, we can iterate through it, loading a few  megabytes of results into
  memory at a time.  For example, we could do: Iterating over <class>MongoCursor</class>find();
  
  foreach ($cursor as $doc) { // do something to each document
  }
  
  ?>
  ]]> This will go through each document in the collection, loading and garbage  collecting
  documents as needed.
  
  Note that this means that a cursor does not "contain" the database results,  it just manages them.
  Thus, if you print a cursor (with, say,  <strong>var_dump()</strong> or <strong>print_r()</strong>), you'll just  get the cursor
  object, not your documents.  To get the documents themselves,  you can use one of the methods
  shown above.


id: MongoCursor::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new cursor

<comment>Param:</comment>
  <info>MongoClient</info>  <strong>$connection</strong>  Database connection.
  <info>string     </info>  <strong>$ns        </strong>  Full name of database and collection.
  <info>array      </info>  <strong>$query     </strong>  Database query.
  <info>array      </info>  <strong>$fields    </strong>  Fields to return.

<comment>Return:</comment>
  <info>unknown</info>  Returns the new cursor.


id: MongoCursor::addOption
type: function
doc:
<comment>Description:</comment>
  Adds a top-level key/value pair to a query
  
  This is an advanced function and should not be used unless you know what  you're doing.
  
  A query can optionally be nested in a "query" field if other options, such as a sort or hint, are
  given.  For instance, adding a sort causes the query  to become a subfield of a bigger query
  object, like:  $query, "orderby" => $sort);
  
  ?>
  ]]>
  
  This method is for adding a top-level field to a query.  It makes the query a subobject (if it
  isn't already) and adds the key/value pair of your chosing to the top level.
  
  It cannot be used to add extra criteria to a query on the fly.  For instance, this will not work:
  find()->addOption("name", "joe")->addOption("age", 20);
  
  ?>
  ]]> This does not query for a user named "joe" with an age of 20.

<comment>Param:</comment>
  <info>string</info>  <strong>$key  </strong>  Fieldname to add.
  <info>mixed </info>  <strong>$value</strong>  Value to add.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.


id: MongoCursor::awaitData
type: function
doc:
<comment>Description:</comment>
  Sets whether this cursor will wait for a while for a tailable cursor to return more data
  
  This method is to be used with tailable cursors. If we are at the end of the data, block for a
  while rather than returning no data. After a timeout period, we do return as normal.

<comment>Param:</comment>
  <info>bool</info>  <strong>$wait</strong>  If the cursor should wait for more data to become available.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * <strong>MongoCursor::tailable()</strong>


id: MongoCursor::batchSize
type: function
doc:
<comment>Description:</comment>
  Limits the number of elements returned in one batch
  
  A cursor typically fetches a batch of result objects and store them locally. This method sets the
  batchSize value to configure the amount of documents retrieved from the server in one round trip.
  However, it will never return more documents than fit in the max batch size limit (usually 4MB).

<comment>Param:</comment>
  <info>int</info>  <strong>$batchSize</strong>  The number of results to return per batch. Each batch requires a round-trip to
                   the server.
                   
                   If <strong>$batchSize</strong> is 2 or more, it represents the size of each batch of objects
                   retrieved. It can be adjusted to optimize performance and limit data transfer.
                   
                   If <strong>$batchSize</strong> is <return>1</return> or negative, it will limit of number returned documents to the
                   absolute value of batchSize, and the cursor will be closed. For example if
                   batchSize is <return>-10</return>, then the server will return a maximum of 10 documents and as
                   many as can fit in 4MB, then close the cursor.
                   
                   A <strong>$batchSize</strong> of <return>1</return> is special, and means the same as <return>-1</return>, i.e. a value of <return>1</return> makes
                   the cursor only capable of returning one document.
                   
                   Note that this feature is different from <strong>MongoCursor::limit()</strong> in that documents
                   must fit within a maximum size, and it removes the need to send a request to
                   close the cursor server-side. The batch size can be changed even after a cursor
                   is iterated, in which case the setting will apply on the next batch retrieval.
                   
                   This cannot override MongoDB's limit on the amount of data it will return to  the
                   client (i.e., if you set batch size to 1,000,000,000, MongoDB will still  only
                   return 4-16MB of results per batch).
                   
                   To ensure consistent behavior, the rules of <strong>MongoCursor::batchSize()</strong> and
                   <strong>MongoCursor::limit()</strong> behave a  little complex but work "as expected".  The rules
                   are: hard limits override  soft limits with preference given to
                   <strong>MongoCursor::limit()</strong> over <strong>MongoCursor::batchSize()</strong>.  After that, whichever is
                   set and lower than the other will take precedence. See below. section for some
                   examples.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * <strong>MongoCursor::limit()</strong>
   * MongoCursorInterface::batchSize


id: MongoCursor::count
type: function
doc:
<comment>Description:</comment>
  Counts the number of results for this query
  
  This method does not affect the state of the cursor: if you haven't queried  yet, you can still
  apply limits, skips, etc.  If you have started iterating through results, it will not move the
  current position of the cursor.  If you have exhausted the cursor, it will not reset it.

<comment>Param:</comment>
  <info>bool</info>  <strong>$foundOnly</strong>  Send cursor limit and skip information to the count function, if applicable.

<comment>Return:</comment>
  <info>int</info>  The number of documents returned by this cursor's query.


id: MongoCursor::current
type: function
doc:
<comment>Description:</comment>
  Returns the current element
  
  This returns <info>null</info> until <strong>MongoCursor::next()</strong> is called.

<comment>Return:</comment>
  <info>array</info>  The current result document as an associative array. <info>null</info> will be returned if there is no
         result.

<comment>See Also:</comment>
   * Iterator::current


id: MongoCursor::dead
type: function
doc:
<comment>Description:</comment>
  Checks if there are results that have not yet been sent from the database
  
  The database sends responses in batches of documents, up to 4MB of documents per response. This
  method checks if the database has more batches or if the  result set has been exhausted.
  
  A cursor being "dead" does not mean that  <strong>MongoCursor::hasNext()</strong> will return <info>false</info>, it only means
  that the database is done sending results to the client. The client should continue iterating
  through results until  <strong>MongoCursor::hasNext()</strong> is <info>false</info>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if there are more results that have not yet been sent to the client, and <info>false</info>
        otherwise.

<comment>See Also:</comment>
   * MongoCursorInterface::dead


id: MongoCursor::doQuery
type: function
doc:
<comment>Description:</comment>
  Execute the query
  
  Please do not use me.
  
  This function actually queries the database.  All queries and commands go  through this function.
  Thus, this function can be overridden to provide  custom query handling.
  
  This handles serializing your query, sending it to the database, receiving a  response, and
  deserializing it.  Thus, if you are planning to override this, your code should probably call out
  to the original to use the existing functionality (see the example below).

<comment>Return:</comment>
  <info>void</info>  <info>null</info>.


id: MongoCursor::explain
type: function
doc:
<comment>Description:</comment>
  Return an explanation of the query, often useful for optimization and debugging

<comment>Return:</comment>
  <info>array</info>  Returns an explanation of the query.


id: MongoCursor::fields
type: function
doc:
<comment>Description:</comment>
  Sets the fields for a query
  
  Fields are specified by <return>"fieldname" : bool</return>.  <info>true</info>  indicates that a field should be returned,
  <info>false</info> indicates that it should not be returned.  You can also use 1 and 0 instead of <info>true</info> and
  <info>false</info>.
  
  Thus, to return only the "summary" field, one could say:
  
  To return all fields except the "hidden" field:

<comment>Param:</comment>
  <info>array</info>  <strong>$f</strong>  Fields to return (or not return).

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.


id: MongoCursor::getNext
type: function
doc:
<comment>Description:</comment>
  Advances the cursor to the next result, and returns that result
  
  MongoCursor::getNext is an alias of MongoCursor::next.

<comment>Return:</comment>
  <info>array</info>  


id: MongoCursor::getReadPreference
type: function
doc:
<comment>Description:</comment>
  Get the read preference for this query

<comment>Return:</comment>
  <info>array</info>  Această funcție întoarce un tablou ce descrie preferința de citire. Tabloul
         conține tipul (<return>type</return>) valorilor pentru șirul cu modul
         preferinței de citire (ce corespunde constantelor <class>MongoClient</class>),
         și <return>tagsets</return> conținând lista tuturor criteriilor setului de
         etichete. Dacă nu a fost specificat nici un set de etichete, <return>tagsets</return>
         nu va fi prezent în tablou.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCursor::setReadPreference()</strong>
   * <strong>MongoCursorInterface::getReadPreference()</strong>


id: MongoCursor::hasNext
type: function
doc:
<comment>Description:</comment>
  Checks if there are any more elements in this cursor

<comment>Return:</comment>
  <info>bool</info>  Returns if there is another element.


id: MongoCursor::hint
type: function
doc:
<comment>Description:</comment>
  Gives the database a hint about the query

<comment>Param:</comment>
  <info>mixed</info>  <strong>$index</strong>  Index to use for the query. If a string is passed, it should correspond to an index
                 name. If an array or object is passed, it should correspond to the specification
                 used to create the index (i.e. the first argument to
                 <strong>MongoCollection::ensureIndex()</strong>).

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.


id: MongoCursor::immortal
type: function
doc:
<comment>Description:</comment>
  Sets whether this cursor will timeout
  
  After remaining idle on the server for some amount of time, cursors, by default, "die."  This is
  generally the behavior one wants. The database cleans up a cursor once all of its results have
  been sent to the client, but if the client doesn't request all of the results, the cursor will
  languish there, taking up resources.  Thus, after a few minutes, the cursor "times out" and the
  database assumes the client has gotten everything it needs and cleans up its the cursor's
  resources.
  
  If, for some reason, you need a cursor to hang around for a long time, you can prevent the
  database from cleaning it up by using this method. However, if you make a cursor immortal, you
  need to iterate through all of its results (or at least until MongoCursor::dead returns <info>true</info>) or
  the cursor will hang around the database forever, taking up resources.

<comment>Param:</comment>
  <info>bool</info>  <strong>$liveForever</strong>  If the cursor should be immortal.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.


id: MongoCursor::key
type: function
doc:
<comment>Description:</comment>
  Returns the current result's _id, or its index within the result set

<comment>Return:</comment>
  <info>stringint</info>  The current result's <return>_id</return> as a string. If the result has no <return>_id</return>, its numeric index
             within the result set will be returned as an integer.

<comment>See Also:</comment>
   * Iterator::key


id: MongoCursor::limit
type: function
doc:
<comment>Description:</comment>
  Limits the number of results returned

<comment>Param:</comment>
  <info>int</info>  <strong>$num</strong>  The number of results to return.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * MongoDB core docs on limit.
   * <strong>MongoCursor::batchSize()</strong>
   * MongoCursor::skip


id: MongoCursor::maxTimeMS
type: function
doc:
<comment>Description:</comment>
  Sets a server-side timeout for this query
  
  Specifies a cumulative time limit in milliseconds to be allowed by the server for processing
  operations on the cursor.

<comment>Param:</comment>
  <info>int</info>  <strong>$ms</strong>  Specifies a cumulative time limit in milliseconds to be allowed by the server for
            processing operations on the cursor.

<comment>Return:</comment>
  <info>MongoCursor</info>  This cursor.


id: MongoCursor::next
type: function
doc:
<comment>Description:</comment>
  Advances the cursor to the next result, and returns that result

<comment>Return:</comment>
  <info>array</info>  Returns the next document.

<comment>See Also:</comment>
   * Iterator::next


id: MongoCursor::partial
type: function
doc:
<comment>Description:</comment>
  If this query should fetch partial results from mongos if a shard is down
  
  This option allows mongos to send partial query results  if a shard is unreachable.  This is only
  applicable when running a sharded  MongoDB cluster and connecting to a mongos.
  
  If a shard goes down and a query needs to be sent to that shard,  mongos will return the results
  (if any) from shards it already contacted, then an error message that it could not reach the shard
  (a <class>MongoCursorException</class> in PHP).  If you would like to get whatever results mongos can provide and
  no  exception, you can use this method.  Note that this means that you won't have an indication
  that a shard is down in your query response.
  
  This has no effect on the query if all shards are reachable.  This flag was implemented in MongoDB
  version 1.7.5, so will only work with that version and higher.

<comment>Param:</comment>
  <info>bool</info>  <strong>$okay</strong>  If receiving partial results is okay.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.


id: MongoCursor::reset
type: function
doc:
<comment>Description:</comment>
  Clears the cursor

<comment>Return:</comment>
  <info>void</info>  <info>null</info>.


id: MongoCursor::rewind
type: function
doc:
<comment>Description:</comment>
  Returns the cursor to the beginning of the result set
  
  This is identical to the function:

<comment>Return:</comment>
  <info>void</info>  <info>null</info>.

<comment>See Also:</comment>
   * Iterator::rewind


id: MongoCursor::setFlag
type: function
doc:
<comment>Description:</comment>
  Sets arbitrary flags in case there is no method available the specific flag
  
  The <class>MongoCursor</class> class has several methods for setting flags on the query object. This method is
  available in case the MongoDB wire protocol has acquired a new flag, and the driver has not been
  updated with a method for this new flag. In all other cases, the method should be used. See the
  "See also" section for available methods.

<comment>Param:</comment>
  <info>int </info>  <strong>$flag</strong>  Which flag to set. You can not set flag 6 (EXHAUST) as the driver does not know how
               to handle them. You will get a warning if you try to use this flag. For available
               flags, please refer to the wire protocol documentation.
  <info>bool</info>  <strong>$set </strong>  Whether the flag should be set (<info>true</info>) or unset (<info>false</info>).

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * <strong>MongoCursor::tailable()</strong>
   * <strong>MongoCursor::immortal()</strong>
   * <strong>MongoCursor::awaitData()</strong>
   * <strong>MongoCursor::partial()</strong>
   * MongoDB core docs onwire protocol query flags


id: MongoCursor::setReadPreference
type: function
doc:
<comment>Description:</comment>
  Set the read preference for this query

<comment>Param:</comment>
  <info>string</info>  <strong>$read_preference</strong>  Modul preferinței de citire:
                            <info>MongoClient::RP_PRIMARY</info>,
                            <info>MongoClient::RP_PRIMARY_PREFERRED</info>,
                            <info>MongoClient::RP_SECONDARY</info>,
                            <info>MongoClient::RP_SECONDARY_PREFERRED</info> sau
                            <info>MongoClient::RP_NEAREST</info>.
  <info>array </info>  <strong>$tags           </strong>  Un tablou din zero sau mai multe seturi de etichete, unde fiecare
                            set de etichete este la rândul său un tablou de criterii utilizate
                            pentru a
                            potrivi etichetele pe membrii setului de replicare.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCursor::getReadPreference()</strong>
   * <strong>MongoCursorInterface::setReadPreference()</strong>


id: MongoCursor::skip
type: function
doc:
<comment>Description:</comment>
  Skips a number of results

<comment>Param:</comment>
  <info>int</info>  <strong>$num</strong>  The number of results to skip.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * MongoCursor::limit


id: MongoCursor::slaveOkay
type: function
doc:
<comment>Description:</comment>
  Sets whether this query can be done on a secondary [deprecated]
  
  This method is deprecated since version 1.5.0. Instead, please use MongoCursor::setReadPreference
  and .
  
  Calling this will make the driver route reads to secondaries if:  You are using a replica set, and
  You created a <class>MongoClient</class> instance using the option <return>"replicaSet" =&gt; "setName"</return>, and  There is a
  healthy secondary that can be reached by the driver.  You can check which server was used for this
  query by calling  <strong>MongoCursor::info()</strong> after running the query.  It's <return>server</return> field will show which
  server the query was sent to.
  
  You are using a replica set, and
  
  You created a <class>MongoClient</class> instance using the option <return>"replicaSet" =&gt; "setName"</return>, and
  
  There is a healthy secondary that can be reached by the driver.
  
  Note that you should use this function even if you do not use the automatic routing to
  secondaries. If you connect directly to a secondary in a replica set, you still need to call this
  function, which basically tells the database that you are aware that you might be getting older
  data and you're okay with that. If you do not call this, you'll get "not master" errors when you
  try to query.
  
  This method will override the static class variable  MongoCursor::$slaveOkay.  It will also
  override  <strong>Mongo::setSlaveOkay()</strong>,  <strong>MongoDB::setSlaveOkay()</strong> and <strong>MongoCollection::setSlaveOkay()</strong>.

<comment>Param:</comment>
  <info>bool</info>  <strong>$okay</strong>  If it is okay to query the secondary.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * 
   * MongoCursor::setReadPreference
   * MongoCursor::getReadPreference


id: MongoCursor::snapshot
type: function
doc:
<comment>Description:</comment>
  Use snapshot mode for the query
  
  Use snapshot mode for the query. Snapshot mode ensures that a document will not be returned more
  than once because an intervening write operation results in a move of the document. Documents
  inserted or deleted during the lifetime of the cursor may or may not be returned, irrespective of
  snapshot mode.
  
  Queries with short responses (less than 1MB) are always effectively snapshotted.
  
  Snapshot mode may not be used with sorting, explicit hints, or queries on sharded collections.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.


id: MongoCursor::sort
type: function
doc:
<comment>Description:</comment>
  Sorts the results by given fields

<comment>Param:</comment>
  <info>array</info>  <strong>$fields</strong>  An array of fields by which to sort. Each element in the array has as key the
                  field name, and as value either <return>1</return> for ascending sort, or <return>-1</return> for descending sort.
                  
                  Each result is first sorted on the first field in the array, then (if it exists)
                  on the second field in the array, etc. This means that the order of the fields in
                  the <strong>$fields</strong> array is important. See also the examples section.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns the same cursor that this method was called on.


id: MongoCursor::tailable
type: function
doc:
<comment>Description:</comment>
  Sets whether this cursor will be left open after fetching the last results
  
  Mongo has a feature known as tailable cursors which are similar to the Unix  "tail -f" command.
  
  Tailable means cursor is not closed when the last data is retrieved.  Rather, the cursor marks the
  final object's position.  you can resume using the  cursor later, from where it was located, if
  more data were received.
  
  Like any "latent cursor", the cursor may become invalid at some point -- for  example if that
  final object it references were deleted.  Thus, you should be prepared to requery if the cursor is
  <strong>MongoCursor::dead()</strong>.

<comment>Param:</comment>
  <info>bool</info>  <strong>$tail</strong>  If the cursor should be tailable.

<comment>Return:</comment>
  <info>MongoCursor</info>  Returns this cursor.

<comment>See Also:</comment>
   * <strong>MongoCursor::awaitData()</strong>


id: MongoCursor::timeout
type: function
doc:
<comment>Description:</comment>
  Sets a client-side timeout for this query
  
  A timeout can be set at any time and will affect subsequent queries on the  cursor, including
  fetching more results from the database.

<comment>Param:</comment>
  <info>int</info>  <strong>$ms</strong>  The number of milliseconds for the cursor to wait for a response. Use <return>-1</return> to wait
            forever. By default, the cursor will wait 30000 milliseconds (30 seconds).

<comment>Return:</comment>
  <info>MongoCursor</info>  This cursor.

<comment>See Also:</comment>
   * MongoCursorInterface::timeout
   * The <return>socketTimeoutMS</return> option for <strong>MongoClient::__construct()</strong>


id: MongoCursorException
type: class
doc:
<comment>Description:</comment>
  Caused by accessing a cursor incorrectly or a error receiving a reply. Note that this can be
  thrown by any database request that receives a reply, not just queries.  Writes, commands, and any
  other operation that sends information to the database and waits for a response can throw a
  <class>MongoCursorException</class>.  The only exception is <return>new MongoClient()</return> (creating a new connection), which
  will only throw <class>MongoConnectionException</class>s.
  
  This returns a specific error message to help diagnose the problem and a numeric error code
  associated with the cause of the exception.
  
  For example, suppose you tried to insert two documents with the same _id: insert(array("_id" =>
  1), array("w" => 1)); $collection->insert(array("_id" => 1), array("w" => 1));
  }
  catch (MongoCursorException $e) { echo "error message: ".$e->getMessage()."\n"; echo "error code:
  ".$e->getCode()."\n";
  }
  
  ?>
  ]]> This would produce output like:  Note that the MongoDB error code (11000) is used for the PHP
  error code. The PHP driver uses the "native" error code wherever possible.
  
  The following is a list of common errors, codes, and causes.  Exact errors are in italics, errors
  where the message can vary are described in obliques.
  
  <return>cannot modify cursor after beginning iteration</return>
  
  Code: 0
  
  You are calling a method that sets up the query after executing the query. Reset the cursor and
  try again.
  
  An example: find(); var_dump($cursor->getNext());
   // getNext() queried the database, it's too late to set a limit $cursor->limit(1);
  }
  catch (MongoCursorException $e) { echo "error message: ".$e->getMessage()."\n"; echo "error code:
  ".$e->getCode()."\n";
  }
  
  // this will work, though:
  $cursor->getNext();
  $cursor->reset();
  $cursor->limit(1);
  
  ?>
  ]]>
  
  Get next batch send errors
  
  Code: 1
  
  Could not send the query to the database.  Make sure the database is still up and the network is
  okay.
  
  <return>cursor not found</return>
  
  Code: 2
  
  The driver was trying to fetch more results from the database, but the database did not have a
  record of the query.  This usually means that the cursor timed out on the server side: after a few
  minutes of inactivity, the database will kill a cursor (see <strong>MongoCursor::immortal()</strong> for
  information on preventing this).
  
  An example: find(); $cursor->getNext();
   // sleep for 15 minutes sleep(60*15);
   while ($cursor->hasNext()) { $cursor->getNext(); }
  }
  catch (MongoCursorException $e) { echo "error message: ".$e->getMessage()."\n"; echo "error code:
  ".$e->getCode()."\n";
  }
  
  ?>
  ]]>
  
  <return>cursor-&gt;buf.pos is null</return>
  
  Code: 3
  
  This may indicate you are out of RAM or some other extraordinary circumstance.
  
  <return>couldn't get response header</return>
  
  Code: 4
  
  A common error if the database or network goes down. This means that the driver couldn't get a
  response from the connection.
  
  <return>no db response</return>
  
  Code: 5
  
  This may not even be an error, for example, the database command "shutdown" returns no response.
  However, if you were expecting a response, this means the database didn't give one.
  
  <return>bad response length: %d, did the db assert?</return>
  
  Code: 6
  
  This means that the database said that its response was less than 0.  This error probably
  indicates a network error or database corruption.
  
  <return>incomplete header</return>
  
  Code: 7
  
  Highly unusual.  Occurs if the database response started out correctly, but broke off in the
  middle.  Probably indicates a network problem.
  
  <return>incomplete response</return>
  
  Code: 8
  
  Highly unusual.  Occurs if the database response started out correctly, but broke off in the
  middle.  Probably indicates a network problem.
  
  <return>couldn't find a response</return>
  
  Code: 9
  
  If the response was cached and now cannot be located.
  
  <return>error getting socket</return>
  
  Code: 10
  
  The socket was closed or encountered an error.  The driver should automatically reconnect (if
  possible) on the next operation.
  
  <return>couldn't find reply, please try again</return>
  
  Code: 11
  
  The driver saves any database responses it cannot immediately match with a request. This exception
  occurs if the driver has already passed your request's response and cannot find your response in
  its cache.
  
  <return>error getting database response: errstr</return>
  
  <return>WSA error getting database response: errstr</return>
  
  "errstr" is an io error reported directly from the C socket subsystem.  On Windows, the error
  message is prefixed with "WSA".
  
  <return>Timeout error</return>
  
  Code: 13
  
  If there was an error while waiting for a query to complete.
  
  <return>couldn't send query: \<various&gt;</return>
  
  Code: 14
  
  C socket error on send.
  
  <return>max number of retries exhausted, couldn't send query</return>
  
  Code: 19
  
  The driver will automatically retry "plain" queries (not commands) a couple of times if the first
  attempt failed for certain reasons.  This is to cause fewer exceptions during replica set failover
  (although you will probably still have to deal with some) and gloss over transient network issues.
  
  This can also be caused by the driver not being able to reconnect at all to the database (if, for
  example, the database is unreachable).
  
  Version 1.2.2+.


id: MongoCursorException::getHost
type: function
doc:
<comment>Description:</comment>
  The hostname of the server that encountered the error
  
  Returns the hostname of the server the query was sent too.

<comment>Return:</comment>
  <info>string</info>  Returns the hostname, or <info>NULL</info> if the hostname is unknown.


id: MongoCursorInterface
type: class
doc:
<comment>Description:</comment>
  Interface for cursors, which can be used to iterate through results of a database query or
  command. This interface is implemented by the <class>MongoCursor</class> and <class>MongoCommandCursor</class> classes.
  
  Similar to <class>Traversable</class>, this interface cannot be implemented in PHP scripts.


id: MongoCursorInterface::batchSize
type: function
doc:
<comment>Description:</comment>
  Limits the number of elements returned in one batch
  
  A cursor typically fetches a batch of result objects and stores them locally. This method sets the
  batch size value to configure the amount of documents retrieved from the server in one round trip.

<comment>Param:</comment>
  <info>int</info>  <strong>$batchSize</strong>  The number of results to return per batch.

<comment>Return:</comment>
  <info>MongoCursorInterface</info>  Returns this cursor.


id: MongoCursorInterface::dead
type: function
doc:
<comment>Description:</comment>
  Checks if there are results that have not yet been sent from the database
  
  This method checks whether the cursor has been exhausted and the database has no more results to
  send to the client. A cursor being "dead" does not necessarily mean that there are no more results
  available for iteration.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if there are more results that have not yet been sent to the client, and <info>false</info>
        otherwise.


id: MongoCursorInterface::getReadPreference
type: function
doc:
<comment>Description:</comment>
  Get the read preference for this query

<comment>Return:</comment>
  <info>array</info>  Această funcție întoarce un tablou ce descrie preferința de citire. Tabloul
         conține tipul (<return>type</return>) valorilor pentru șirul cu modul
         preferinței de citire (ce corespunde constantelor <class>MongoClient</class>),
         și <return>tagsets</return> conținând lista tuturor criteriilor setului de
         etichete. Dacă nu a fost specificat nici un set de etichete, <return>tagsets</return>
         nu va fi prezent în tablou.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCursorInterface::setReadPreference()</strong>


id: MongoCursorInterface::info
type: function
doc:
<comment>Description:</comment>
  Gets information about the cursor's creation and iteration
  
  Returns information about the cursor's creation and iteration. This can be called before or after
  the cursor has started iterating.

<comment>Return:</comment>
  <info>array</info>  Returns the namespace, batch size, limit, skip, flags, query, and projected fields for this
         cursor. If the cursor has started iterating, additional information about iteration and the
         connection will be included.


id: MongoCursorInterface::setReadPreference
type: function
doc:
<comment>Description:</comment>
  Set the read preference for this query

<comment>Param:</comment>
  <info>string</info>  <strong>$read_preference</strong>  Modul preferinței de citire:
                            <info>MongoClient::RP_PRIMARY</info>,
                            <info>MongoClient::RP_PRIMARY_PREFERRED</info>,
                            <info>MongoClient::RP_SECONDARY</info>,
                            <info>MongoClient::RP_SECONDARY_PREFERRED</info> sau
                            <info>MongoClient::RP_NEAREST</info>.
  <info>array </info>  <strong>$tags           </strong>  Un tablou din zero sau mai multe seturi de etichete, unde fiecare
                            set de etichete este la rândul său un tablou de criterii utilizate
                            pentru a
                            potrivi etichetele pe membrii setului de replicare.

<comment>Return:</comment>
  <info>MongoCursorInterface</info>  Returns this cursor.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoCursorInterface::getReadPreference()</strong>


id: MongoCursorInterface::timeout
type: function
doc:
<comment>Description:</comment>
  Sets a client-side timeout for this query
  
  A timeout can be set at any time and will affect subsequent data retrieval associated with this
  cursor, including fetching more results from the database.

<comment>Param:</comment>
  <info>int</info>  <strong>$ms</strong>  The number of milliseconds for the cursor to wait for a response. Use <return>-1</return> to wait
            forever. By default, the cursor will wait 30000 milliseconds (30 seconds).

<comment>Return:</comment>
  <info>MongoCursorInterface</info>  Returns this cursor.

<comment>See Also:</comment>
   * The <return>socketTimeoutMS</return> option for <strong>MongoClient::__construct()</strong>


id: MongoCursorTimeoutException
type: class
doc:
<comment>Description:</comment>
  Caused by a query timing out.  You can set the length of time to wait before this exception is
  thrown by calling  <strong>MongoCursor::timeout()</strong> on the cursor or setting <return>MongoCursor::$timeout</return>.  The
  static variable is useful for queries such as database commands and  <strong>MongoCollection::findOne()</strong>,
  both of which implicitly use  cursors.


id: MongoDB
type: class
doc:
<comment>Description:</comment>
  Instances of this class are used to interact with a database.  To get a database: Selecting a
  databaseselectDB("example");
  
  ?>
  ]]> Database names can use almost any character in the ASCII range.  However, they cannot contain
  " ", "." or be the empty string. The name "system" is also reserved.
  
  A few unusual, but valid, database names: "null", "[x,y]", "3", "\"", "/".
  
  Unlike collection names, database names may contain "$".


id: MongoDB::__construct
type: function
doc:
<comment>Description:</comment>
  Creates a new database
  
  This method is not meant to be called directly.  The preferred way to create an instance of
  MongoDB is through <strong>MongoClient::__get()</strong> or <strong>MongoClient::selectDB()</strong>.
  
  If you're ignoring the previous paragraph and want to call it directly you can do so:
  
  But don't.  Isn't this much nicer:

<comment>Param:</comment>
  <info>MongoClient</info>  <strong>$conn</strong>  Database connection.
  <info>string     </info>  <strong>$name</strong>  Database name.

<comment>Return:</comment>
  <info>unknown</info>  Returns the database.


id: MongoDB::__get
type: function
doc:
<comment>Description:</comment>
  Gets a collection
  
  This is the easiest way of getting a collection from a database object.  If a collection name
  contains strange characters, you may have to use  <strong>MongoDB::selectCollection()</strong> instead.
  selectDB("foo")->selectCollection("bar");
  $collection = $mongo->foo->bar;
  
  ?>
  ]]>

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>  The name of the collection.

<comment>Return:</comment>
  <info>MongoCollection</info>  Returns the collection.


id: MongoDB::__toString
type: function
doc:
<comment>Description:</comment>
  The name of this database

<comment>Return:</comment>
  <info>string</info>  Returns this database's name.


id: MongoDB::authenticate
type: function
doc:
<comment>Description:</comment>
  Log in to this database
  
  This method causes its connection to be authenticated.  If authentication is enabled for the
  database server (it's not, by default), you need to log in before the database will allow you to
  do anything.
  
  In general, you should use the authenticate built into <strong>MongoClient::__construct()</strong> in preference to
  this method. If you authenticate on connection and the connection drops and reconnects during your
  session, you'll be reauthenticated.  If you manually authenticated using this method and the
  connection drops, you'll have to call this method again once you're reconnected.
  
  This method is identical to running: command(array("getnonce" => 1));
  
  $saltedHash = md5($nonce["nonce"]."${username}${hash}");
  
  $result = $db->command(array("authenticate" => 1, "user" => $username, "nonce" => $nonce["nonce"],
  "key" => $saltedHash
  ));
  
  ?>
  ]]>
  
  Once a connection has been authenticated, it can only be un-authenticated by using the "logout"
  database command: command(array("logout" => 1));
  
  ?>
  ]]>

<comment>Param:</comment>
  <info>string</info>  <strong>$username</strong>  The username.
  <info>string</info>  <strong>$password</strong>  The password (in plaintext).

<comment>Return:</comment>
  <info>array</info>  Returns database response.  If the login was successful, it will return  1);
         ?>
         ]]> If something went wrong, it will return  0, "errmsg" => "auth fails");
         ?>
         ]]> ("auth fails" could be another message, depending on database version and what when
         wrong).


id: MongoDB::command
type: function
doc:
<comment>Description:</comment>
  Execute a database command
  
  Almost everything that is not a CRUD operation can be done with a database command.  Need to know
  the database version?  There's a command for that. Need to do aggregation?  There's a command for
  that.  Need to turn up logging?  You get the idea.
  
  This method is identical to: selectCollection('$cmd')->findOne($data);
  }
  
  ?>
  ]]>

<comment>Param:</comment>
  <info>array </info>  <strong>$command</strong>  The query to send.
  <info>array </info>  <strong>$options</strong>  An array of options for the index creation. Currently available options include:
                    <return>"socketTimeoutMS"</return>Această opțiune specifică
                    limita de timp în milisecunde pentru comunicarea prin socket. Dacă serverul nu
                    răspunde în limita intervalului de timp, se va emite o
                    <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                    de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                    <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                    nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                    <return>30000</return> (30 secunde).
                    
                    <return>"socketTimeoutMS"</return>
                    
                    Această opțiune specifică
                    limita de timp în milisecunde pentru comunicarea prin socket. Dacă serverul nu
                    răspunde în limita intervalului de timp, se va emite o
                    <class>MongoCursorTimeoutException</class> și nu va fi nici o posibilitate
                    de a determina dacă serverul a efectuat înscrierea, sau nu. Valoarea
                    <return>-1</return> poate fi specificată pentru a suspenda pentru o perioadă
                    nedefinită. Valoarea implicită pentru <class>MongoClient</class> este
                    <return>30000</return> (30 secunde).
                    
                    The following options are deprecated and should no longer be used: <return>"timeout"</return>Un
                    pseudonim învechit pentru <return>"socketTimeoutMS"</return>.
                    
                    <return>"timeout"</return>
                    
                    Un pseudonim învechit pentru <return>"socketTimeoutMS"</return>.
  <info>string</info>  <strong>$hash   </strong>  Set to the connection hash of the server that executed the command. When the
                    command result is suitable for creating a <class>MongoCommandCursor</class>, the hash is
                    intended to be passed to <strong>MongoCommandCursor::createFromDocument()</strong>.
                    
                    The hash will also correspond to a connection returned from
                    <strong>MongoClient::getConnections()</strong>.

<comment>Return:</comment>
  <info>array</info>  Returns database response. Every database response is always maximum one document, which
         means that the result of a database command can never exceed 16MB. The resulting document's
         structure depends on the command, but most results will have the <return>ok</return> field to indicate
         success or failure and <return>results</return> containing an array of each of the resulting documents.

<comment>See Also:</comment>
   * MongoCollection::aggregate
   * MongoCollection::findAndModify
   * MongoCollection::group


id: MongoDB::createCollection
type: function
doc:
<comment>Description:</comment>
  Creates a collection
  
  This method is used to create capped collections and other collections  requiring special options.
  It is identical to running: command(array( "create" => $name, "capped" => $options["capped"],
  "size" => $options["size"], "max" => $options["max"], "autoIndexId" => $options["autoIndexId"],
  ));
  
  ?>
  ]]> See <strong>MongoDB::command()</strong> for more information about database commands.

<comment>Param:</comment>
  <info>string</info>  <strong>$name       </strong>  The name of the collection.
  <info>array </info>  <strong>$options    </strong>  An array containing options for the collections. Each option is its own
                        element in the options array, with the option name listed below being the
                        key of the element. The supported options depend on the MongoDB server
                        version and storage engine, and the driver passes any option that you give
                        it straight to the server. A few of the supported options are, but you can
                        find a full list in the MongoDB core docs on createCollection:
                        
                        <strong>$capped</strong> If the collection should be a fixed size. <strong>$size</strong> If the collection is
                        fixed size, its size in bytes. <strong>$max</strong> If the collection is fixed size, the
                        maximum number of elements to store in the collection. <strong>$autoIndexId</strong> If
                        capped is <info>true</info> you can specify <info>false</info> to disable the automatic index created
                        on the <return>_id</return> field. Before MongoDB 2.2, the default value for <return>autoIndexId</return> was
                        <info>false</info>.
                        
                        If the collection should be a fixed size.
                        
                        If the collection is fixed size, its size in bytes.
                        
                        If the collection is fixed size, the maximum number of elements to store in
                        the collection.
                        
                        If capped is <info>true</info> you can specify <info>false</info> to disable the automatic index
                        created on the <return>_id</return> field. Before MongoDB 2.2, the default value for
                        <return>autoIndexId</return> was <info>false</info>.
  <info>bool  </info>  <strong>$capped     </strong>  If the collection should be a fixed size.
  <info>int   </info>  <strong>$size       </strong>  If the collection is fixed size, its size in bytes.
  <info>int   </info>  <strong>$max        </strong>  If the collection is fixed size, the maximum number of elements to store in
                        the collection.
  <info>      </info>  <strong>$autoIndexId</strong>  If capped is <info>true</info> you can specify <info>false</info> to disable the automatic index
                        created on the <return>_id</return> field. Before MongoDB 2.2, the default value for
                        <return>autoIndexId</return> was <info>false</info>.

<comment>Return:</comment>
  <info>MongoCollection</info>  Returns a collection object representing the new collection.


id: MongoDB::createDBRef
type: function
doc:
<comment>Description:</comment>
  Creates a database reference
  
  This method is a flexible interface for creating database refrences (see <class>MongoDBRef</class>).

<comment>Param:</comment>
  <info>string</info>  <strong>$collection    </strong>  The collection to which the database reference will point.
  <info>mixed </info>  <strong>$document_or_id</strong>  If an array or object is given, its <return>_id</return> field will be used as the
                           reference ID. If a <class>MongoId</class> or scalar is given, it will be used as the
                           reference ID.

<comment>Return:</comment>
  <info>array</info>  Returns a database reference array.
         
         If an array without an <return>_id</return> field was provided as the <return>document_or_id</return> parameter, <info>null</info> will be
         returned.


id: MongoDB::drop
type: function
doc:
<comment>Description:</comment>
  Drops this database
  
  This drops the database currently being used.
  
  This is identical to running: command(array("dropDatabase" => 1));
  }
  
  ?>
  ]]>

<comment>Return:</comment>
  <info>array</info>  Returns the database response.


id: MongoDB::dropCollection
type: function
doc:
<comment>Description:</comment>
  Drops a collection [deprecated]
  
  Use <strong>MongoCollection::drop()</strong> instead.
  
   This function leaks memory in version 1.0.7 and earlier! 

<comment>Param:</comment>
  <info>mixed</info>  <strong>$coll</strong>  MongoCollection or name of collection to drop.

<comment>Return:</comment>
  <info>array</info>  Returns the database response.


id: MongoDB::execute
type: function
doc:
<comment>Description:</comment>
  Runs JavaScript code on the database server [deprecated]
  
  The eval command, which this method invokes, is deprecated in MongoDB 3.0+.
  
  The Mongo database server runs a JavaScript engine.  This method allows you to run arbitary
  JavaScript on the database.  This can be useful if you want touch a number of collections lightly,
  or process some results on the database side to reduce the amount that has to be sent to the
  client.
  
  Running JavaScript in the database takes a write lock, meaning it blocks  other operations.  Make
  sure you consider this before running a long script.
  
  This is a wrapper for the eval database command. This method is basically: command(array('eval' =>
  $code, 'args' => $args));
  }
  
  ?>
  ]]>
  
  MongoDB implies a return statement if you have a single statement on a single line. This can cause
  some unintuitive behavior.  For example, this returns  "foo":
  
  However, these return <info>null</info>:
  
  To avoid surprising behavior, it is best not to depend on MongoDB to decide  what to return, but
  to explicitly state a return value. In the examples  above, we can change them to:
  
  Now the first statement will return "foo" and the second statement will  return a count of the
  "foo" collection.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$code</strong>  <class>MongoCode</class> or string to execute.
  <info>array</info>  <strong>$args</strong>  Arguments to be passed to <return>code</return>.

<comment>Return:</comment>
  <info>array</info>  Returns the result of the evaluation.

<comment>See Also:</comment>
   * The MongoDB eval command docs


id: MongoDB::forceError
type: function
doc:
<comment>Description:</comment>
  Creates a database error
  
  This method is not very useful for normal MongoDB use.  It forces a database  error to occur.
  This means that <strong>MongoDB::lastError()</strong> will return a generic database error after running this
  command.
  
  This command is identical to running: command(array('forceerror' => 1));
  }
  
  ?>
  ]]>

<comment>Return:</comment>
  <info>bool</info>  Returns the database response.


id: MongoDB::getCollectionInfo
type: function
doc:
<comment>Description:</comment>
  Returns information about collections in this database
  
  Gets a list of all collections in the database and returns them as an array of documents, which
  contain their names and options.
  
  Această metodă va utiliza comanda bazei de date
  listCollections
  la comunicarea cu MongoDB 2.8+. Pentru versiunile anterioare ale bazei de date, metoda va
  interpela colecția specială
  <return>system.namespaces</return>.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  An array of options for listing the collections. Currently available options
                   include: <return>"filter"</return>Criteriu opțional pentru
                   interpelare. Dacă este furnizat, acest criteriu va fi utilizat pentru a filtra
                   colecțile incluse în rezultat.Câmpurile relevante, ce pot fi
                   interpelate, includ <return>"name"</return> (colecția name ca șir de caractere,
                   fără prefixul cu denumirea bazei de date) și <return>"options" (obiect ce
                   conține opțiuni utilizate la crearea colecției).</return>.MongoDB 2.6 și versiunile
                   anterioare necesită ca criteriul
                   <return>"name"</return>, dacă este specificat, să fie o valoare string (de ex.
                   potrivirea la egalitate). Aceasta este din cauza că driver-ul trebuie să adauge
                   ca prefix la valoare denumirea bazei de date pentru a interpela colecția
                   <return>system.namespaces</return>. Versiunile ulterioare ale MongoDB nu au
                   această limitare, deoarece driver-ul va utiliza comanda listCollections.
                   <return>"includeSystemCollections"</return>Boolean, implicit
                   este <info>false</info>. Determină dacă colecțiile de sistem trebuie incluse în rezultat.
                   
                   <return>"filter"</return>
                   
                   Criteriu opțional pentru
                   interpelare. Dacă este furnizat, acest criteriu va fi utilizat pentru a filtra
                   colecțile incluse în rezultat.
                   
                   Câmpurile relevante, ce pot fi
                   interpelate, includ <return>"name"</return> (colecția name ca șir de caractere,
                   fără prefixul cu denumirea bazei de date) și <return>"options" (obiect ce
                   conține opțiuni utilizate la crearea colecției).</return>.
                   
                   MongoDB 2.6 și versiunile anterioare necesită ca criteriul
                   <return>"name"</return>, dacă este specificat, să fie o valoare string (de ex.
                   potrivirea la egalitate). Aceasta este din cauza că driver-ul trebuie să adauge
                   ca prefix la valoare denumirea bazei de date pentru a interpela colecția
                   <return>system.namespaces</return>. Versiunile ulterioare ale MongoDB nu au
                   această limitare, deoarece driver-ul va utiliza comanda listCollections.
                   
                   <return>"includeSystemCollections"</return>
                   
                   Boolean, implicit
                   este <info>false</info>. Determină dacă colecțiile de sistem trebuie incluse în rezultat.
                   
                   The following option may be used with MongoDB 2.8+: <return>"maxTimeMS"</return>Specifică o limită
                   de timp cumulativă în milisecunde pentru procesarea
                   operațiunii pe server (nu include timpul de așteptare). Dacă operațiunea nu este
                   terminată pe server în timpul rezervat, va fi emisă o
                   <class>MongoExecutionTimeoutException</class>.
                   
                   <return>"maxTimeMS"</return>
                   
                   Specifică o limită de timp cumulativă în milisecunde pentru procesarea
                   operațiunii pe server (nu include timpul de așteptare). Dacă operațiunea nu este
                   terminată pe server în timpul rezervat, va fi emisă o
                   <class>MongoExecutionTimeoutException</class>.

<comment>Return:</comment>
  <info>array</info>  This function returns an array where each element is an array describing a collection.
         Elements will contain a <return>name</return> key denoting the name of the collection, and optionally
         contain an <return>options</return> key denoting an array of objects used to create the collection. For
         example, capped collections will include <return>capped</return> and <return>size</return> options.

<comment>See Also:</comment>
   * <strong>MongoDB::getCollectionNames()</strong>
   * <strong>MongoDB::listCollections()</strong>


id: MongoDB::getCollectionNames
type: function
doc:
<comment>Description:</comment>
  Gets an array of names for all collections in this database
  
  Gets a list of all collections in the database and returns their names as an array of strings.
  
  Această metodă va utiliza comanda bazei de date
  listCollections
  la comunicarea cu MongoDB 2.8+. Pentru versiunile anterioare ale bazei de date, metoda va
  interpela colecția specială
  <return>system.namespaces</return>.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  An array of options for listing the collections. Currently available options
                   include: <return>"filter"</return>Criteriu opțional pentru
                   interpelare. Dacă este furnizat, acest criteriu va fi utilizat pentru a filtra
                   colecțile incluse în rezultat.Câmpurile relevante, ce pot fi
                   interpelate, includ <return>"name"</return> (colecția name ca șir de caractere,
                   fără prefixul cu denumirea bazei de date) și <return>"options" (obiect ce
                   conține opțiuni utilizate la crearea colecției).</return>.MongoDB 2.6 și versiunile
                   anterioare necesită ca criteriul
                   <return>"name"</return>, dacă este specificat, să fie o valoare string (de ex.
                   potrivirea la egalitate). Aceasta este din cauza că driver-ul trebuie să adauge
                   ca prefix la valoare denumirea bazei de date pentru a interpela colecția
                   <return>system.namespaces</return>. Versiunile ulterioare ale MongoDB nu au
                   această limitare, deoarece driver-ul va utiliza comanda listCollections.
                   <return>"includeSystemCollections"</return>Boolean, implicit
                   este <info>false</info>. Determină dacă colecțiile de sistem trebuie incluse în rezultat.
                   
                   <return>"filter"</return>
                   
                   Criteriu opțional pentru
                   interpelare. Dacă este furnizat, acest criteriu va fi utilizat pentru a filtra
                   colecțile incluse în rezultat.
                   
                   Câmpurile relevante, ce pot fi
                   interpelate, includ <return>"name"</return> (colecția name ca șir de caractere,
                   fără prefixul cu denumirea bazei de date) și <return>"options" (obiect ce
                   conține opțiuni utilizate la crearea colecției).</return>.
                   
                   MongoDB 2.6 și versiunile anterioare necesită ca criteriul
                   <return>"name"</return>, dacă este specificat, să fie o valoare string (de ex.
                   potrivirea la egalitate). Aceasta este din cauza că driver-ul trebuie să adauge
                   ca prefix la valoare denumirea bazei de date pentru a interpela colecția
                   <return>system.namespaces</return>. Versiunile ulterioare ale MongoDB nu au
                   această limitare, deoarece driver-ul va utiliza comanda listCollections.
                   
                   <return>"includeSystemCollections"</return>
                   
                   Boolean, implicit
                   este <info>false</info>. Determină dacă colecțiile de sistem trebuie incluse în rezultat.
                   
                   The following option may be used with MongoDB 2.8+: <return>"maxTimeMS"</return>Specifică o limită
                   de timp cumulativă în milisecunde pentru procesarea
                   operațiunii pe server (nu include timpul de așteptare). Dacă operațiunea nu este
                   terminată pe server în timpul rezervat, va fi emisă o
                   <class>MongoExecutionTimeoutException</class>.
                   
                   <return>"maxTimeMS"</return>
                   
                   Specifică o limită de timp cumulativă în milisecunde pentru procesarea
                   operațiunii pe server (nu include timpul de așteptare). Dacă operațiunea nu este
                   terminată pe server în timpul rezervat, va fi emisă o
                   <class>MongoExecutionTimeoutException</class>.

<comment>Return:</comment>
  <info>array</info>  Returns the collection names as an array of strings.

<comment>See Also:</comment>
   * <strong>MongoDB::listCollections()</strong>
   * <strong>MongoDB::getCollectionInfo()</strong>


id: MongoDB::getDBRef
type: function
doc:
<comment>Description:</comment>
  Fetches the document pointed to by a database reference

<comment>Param:</comment>
  <info>array</info>  <strong>$ref</strong>  A database reference.

<comment>Return:</comment>
  <info>array</info>  Returns the document pointed to by the reference.


id: MongoDB::getGridFS
type: function
doc:
<comment>Description:</comment>
  Fetches toolkit for dealing with files stored in this database

<comment>Param:</comment>
  <info>string</info>  <strong>$prefix</strong>  The prefix for the files and chunks collections.

<comment>Return:</comment>
  <info>MongoGridFS</info>  Returns a new gridfs object for this database.


id: MongoDB::getProfilingLevel
type: function
doc:
<comment>Description:</comment>
  Gets this database's profiling level
  
  This returns the current database profiling level.
  
  The database profiler tracks query execution times.  If you turn it on (say, using
  <strong>MongoDB::setProfilingLevel()</strong> or the shell), you can see how many queries took longer than a given
  number of milliseconds or the timing for all queries.
  
  Note that profiling slows down queries, so it is better to use in development or testing than in a
  time-sensitive application.
  
  This function is equivalent to running: command(array('profile' => -1));
  }
  
  ?>
  ]]>

<comment>Return:</comment>
  <info>int</info>  Returns the profiling level.

<comment>See Also:</comment>
   * MongoDB core docs on profiling
   * MongoDB::setProfilingLevel


id: MongoDB::getReadPreference
type: function
doc:
<comment>Description:</comment>
  Get the read preference for this database

<comment>Return:</comment>
  <info>array</info>  Această funcție întoarce un tablou ce descrie preferința de citire. Tabloul
         conține tipul (<return>type</return>) valorilor pentru șirul cu modul
         preferinței de citire (ce corespunde constantelor <class>MongoClient</class>),
         și <return>tagsets</return> conținând lista tuturor criteriilor setului de
         etichete. Dacă nu a fost specificat nici un set de etichete, <return>tagsets</return>
         nu va fi prezent în tablou.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoDB::setReadPreference()</strong>


id: MongoDB::getSlaveOkay
type: function
doc:
<comment>Description:</comment>
  Get slaveOkay setting for this database
  
  See the query section of this manual for information on distributing reads to secondaries.

<comment>Return:</comment>
  <info>bool</info>  Returns the value of slaveOkay for this instance.

<comment>See Also:</comment>
   * 
   * MongoDB::getReadPreference
   * MongoDB::setReadPreference


id: MongoDB::getWriteConcern
type: function
doc:
<comment>Description:</comment>
  Get the write concern for this database

<comment>Return:</comment>
  <info>array</info>  Această funcție întoarce un tablou ce descrie gradul de participare la înscriere.
         Tabloul conține valorile <return>w</return> pentru un nivel de confirmare
         întreg sau ca șir de caractere și <return>wtimeout</return> ce denotă numărul
         maximal de milisecunde de așteptare până când serverul satisface gradul de
         participare la înscriere.

<comment>See Also:</comment>
   * The write concern documentation.
   * <strong>MongoDB::setWriteConcern()</strong>


id: MongoDB::lastError
type: function
doc:
<comment>Description:</comment>
  Check if there was an error on the most recent db operation performed
  
  This method is equivalent to: command(array('getlasterror' => 1));
  }
  
  ?>
  ]]>

<comment>Return:</comment>
  <info>array</info>  Returns the error, if there was one.


id: MongoDB::listCollections
type: function
doc:
<comment>Description:</comment>
  Gets an array of MongoCollection objects for all collections in this database
  
  Gets a list of all collections in the database and returns them as an array of <class>MongoCollection</class>
  objects.
  
  Această metodă va utiliza comanda bazei de date
  listCollections
  la comunicarea cu MongoDB 2.8+. Pentru versiunile anterioare ale bazei de date, metoda va
  interpela colecția specială
  <return>system.namespaces</return>.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  An array of options for listing the collections. Currently available options
                   include: <return>"filter"</return>Criteriu opțional pentru
                   interpelare. Dacă este furnizat, acest criteriu va fi utilizat pentru a filtra
                   colecțile incluse în rezultat.Câmpurile relevante, ce pot fi
                   interpelate, includ <return>"name"</return> (colecția name ca șir de caractere,
                   fără prefixul cu denumirea bazei de date) și <return>"options" (obiect ce
                   conține opțiuni utilizate la crearea colecției).</return>.MongoDB 2.6 și versiunile
                   anterioare necesită ca criteriul
                   <return>"name"</return>, dacă este specificat, să fie o valoare string (de ex.
                   potrivirea la egalitate). Aceasta este din cauza că driver-ul trebuie să adauge
                   ca prefix la valoare denumirea bazei de date pentru a interpela colecția
                   <return>system.namespaces</return>. Versiunile ulterioare ale MongoDB nu au
                   această limitare, deoarece driver-ul va utiliza comanda listCollections.
                   <return>"includeSystemCollections"</return>Boolean, implicit
                   este <info>false</info>. Determină dacă colecțiile de sistem trebuie incluse în rezultat.
                   
                   <return>"filter"</return>
                   
                   Criteriu opțional pentru
                   interpelare. Dacă este furnizat, acest criteriu va fi utilizat pentru a filtra
                   colecțile incluse în rezultat.
                   
                   Câmpurile relevante, ce pot fi
                   interpelate, includ <return>"name"</return> (colecția name ca șir de caractere,
                   fără prefixul cu denumirea bazei de date) și <return>"options" (obiect ce
                   conține opțiuni utilizate la crearea colecției).</return>.
                   
                   MongoDB 2.6 și versiunile anterioare necesită ca criteriul
                   <return>"name"</return>, dacă este specificat, să fie o valoare string (de ex.
                   potrivirea la egalitate). Aceasta este din cauza că driver-ul trebuie să adauge
                   ca prefix la valoare denumirea bazei de date pentru a interpela colecția
                   <return>system.namespaces</return>. Versiunile ulterioare ale MongoDB nu au
                   această limitare, deoarece driver-ul va utiliza comanda listCollections.
                   
                   <return>"includeSystemCollections"</return>
                   
                   Boolean, implicit
                   este <info>false</info>. Determină dacă colecțiile de sistem trebuie incluse în rezultat.
                   
                   The following option may be used with MongoDB 2.8+: <return>"maxTimeMS"</return>Specifică o limită
                   de timp cumulativă în milisecunde pentru procesarea
                   operațiunii pe server (nu include timpul de așteptare). Dacă operațiunea nu este
                   terminată pe server în timpul rezervat, va fi emisă o
                   <class>MongoExecutionTimeoutException</class>.
                   
                   <return>"maxTimeMS"</return>
                   
                   Specifică o limită de timp cumulativă în milisecunde pentru procesarea
                   operațiunii pe server (nu include timpul de așteptare). Dacă operațiunea nu este
                   terminată pe server în timpul rezervat, va fi emisă o
                   <class>MongoExecutionTimeoutException</class>.

<comment>Return:</comment>
  <info>array</info>  Returns an array of MongoCollection objects.

<comment>See Also:</comment>
   * <strong>MongoDB::getCollectionNames()</strong>
   * <strong>MongoDB::getCollectionInfo()</strong>


id: MongoDB::prevError
type: function
doc:
<comment>Description:</comment>
  Checks for the last error thrown during a database operation
  
  <strong>MongoDB::lastError()</strong> is usually preferred to this.  This  method returns the last database error
  that occurred and how many operations ago it occurred.  It is mostly deprecated.

<comment>Return:</comment>
  <info>array</info>  Returns the error and the number of operations ago it occurred.


id: MongoDB::repair
type: function
doc:
<comment>Description:</comment>
  Repairs and compacts this database
  
  This creates a fresh copy of all database data.  It will remove any corrupt  data and compact and
  large stretches of free space it finds.  This is a very slow operation on a large database.
  
  This is usually run from the shell or the command line, not the driver.
  
  It is equivalent to the function: command(array('repairDatabase' => 1));
  }
  
  ?>
  ]]>

<comment>Param:</comment>
  <info>bool</info>  <strong>$preserve_cloned_files</strong>  If cloned files should be kept if the repair fails.
  <info>bool</info>  <strong>$backup_original_files</strong>  If original files should be backed up.

<comment>Return:</comment>
  <info>array</info>  Returns db response.


id: MongoDB::resetError
type: function
doc:
<comment>Description:</comment>
  Clears any flagged errors on the database
  
  This method is not used in normal operations.  It resets the database error  tracker (which can be
  incremented with  <strong>MongoDB::forceError()</strong>, also not normally used).
  
  It is equivalent to running: command(array('reseterror' => 1));
  }
  
  ?>
  ]]>

<comment>Return:</comment>
  <info>array</info>  Returns the database response.


id: MongoDB::selectCollection
type: function
doc:
<comment>Description:</comment>
  Gets a collection

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>  The collection name.

<comment>Return:</comment>
  <info>MongoCollection</info>  Returns a new collection object.


id: MongoDB::setProfilingLevel
type: function
doc:
<comment>Description:</comment>
  Sets this database's profiling level
  
  This changes the current database profiling level.
  
  This function is equivalent to running: command(array('profile' => $level));
  }
  
  ?>
  ]]>
  
  The options for level are 0 (off), 1 (queries &gt; 100ms), and 2 (all queries). If you would like
  to profile queries that take longer than another time  period, use the database command and pass
  it a second option, the number of milliseconds.  For example, to profile all queries that take
  longer than one second, run: command(array('profile' => 1, 'slowms' => 1000));
  
  ?>
  ]]>
  
  Profiled queries will appear in the <return>system.profile</return>  collection of this database.

<comment>Param:</comment>
  <info>int</info>  <strong>$level</strong>  Profiling level.

<comment>Return:</comment>
  <info>int</info>  Returns the previous profiling level.

<comment>See Also:</comment>
   * MongoDB core docs on profiling
   * MongoDB::getProfilingLevel


id: MongoDB::setReadPreference
type: function
doc:
<comment>Description:</comment>
  Set the read preference for this database

<comment>Param:</comment>
  <info>string</info>  <strong>$read_preference</strong>  Modul preferinței de citire:
                            <info>MongoClient::RP_PRIMARY</info>,
                            <info>MongoClient::RP_PRIMARY_PREFERRED</info>,
                            <info>MongoClient::RP_SECONDARY</info>,
                            <info>MongoClient::RP_SECONDARY_PREFERRED</info> sau
                            <info>MongoClient::RP_NEAREST</info>.
  <info>array </info>  <strong>$tags           </strong>  Un tablou din zero sau mai multe seturi de etichete, unde fiecare
                            set de etichete este la rândul său un tablou de criterii utilizate
                            pentru a
                            potrivi etichetele pe membrii setului de replicare.

<comment>Return:</comment>
  <info>bool</info>  Întoarce <info>true</info> în caz de succes, sau <info>false</info> în caz contrar.

<comment>See Also:</comment>
   * The read preferences documentation.
   * <strong>MongoDB::getReadPreference()</strong>


id: MongoDB::setSlaveOkay
type: function
doc:
<comment>Description:</comment>
  Change slaveOkay setting for this database
  
  See the query section of this manual for information on distributing reads to secondaries.

<comment>Param:</comment>
  <info>bool</info>  <strong>$ok</strong>  If reads should be sent to secondary members of a replica set for all  possible queries
             using this <class>MongoDB</class> instance.

<comment>Return:</comment>
  <info>bool</info>  Returns the former value of slaveOkay for this instance.

<comment>See Also:</comment>
   * 
   * MongoDB::setReadPreference
   * MongoDB::getReadPreference


id: MongoDB::setWriteConcern
type: function
doc:
<comment>Description:</comment>
  Set the write concern for this database

<comment>Param:</comment>
  <info>mixed</info>  <strong>$w       </strong>  Gradul de participare la înscriere. Aceasta poate fi un întreg
                    ce denotă numărul de servere necesare pentru a confirma operațiunea de
                    înscriere,
                    sau un mod scris ca șir de caractere (de ex. "majority").
  <info>int  </info>  <strong>$wtimeout</strong>  Numărul maximal de milisecunde de așteptare până când serverul
                    satisface gradul de participare la înscriere.

<comment>Return:</comment>
  <info>bool</info>  Întoarce <info>true</info> în caz de succes, sau <info>false</info> în caz contrar.

<comment>See Also:</comment>
   * The write concern documentation.
   * <strong>MongoDB::getWriteConcern()</strong>


id: MongoDBRef
type: class
doc:
<comment>Description:</comment>
  This class can be used to create lightweight links between objects in  different collections.
  
  Motivation: Suppose we need to refer to a document in  another collection. The easiest way is to
  create a field in the current  document.  For example, if we had a "people" collection and an
  "addresses" collection, we might want to create a link between each person document and an address
  document: Linking documentspeople;
  $addresses = $db->addresses;
  
  $myAddress = array("line 1" => "123 Main Street",  "line 2" => null, "city" => "Springfield",
  "state" => "Vermont", "country" => "USA");
  
  // save the address
  $addresses->insert($myAddress);
  
  // save a person with a reference to the address
  $me = array("name" => "Fred", "address" => $myAddress['_id']);
  $people->insert($me);
  
  ?>
  ]]>
  
  Then, later on, we can find the person's address by querying the "addresses" collection with the
  <class>MongoId</class> we saved in the "people" collection.
  
  Suppose now that we have a more general case, where we don't know which collection (or even which
  database) contains the referenced document.   <class>MongoDBRef</class> is a good choice for this case, as it is
  a common format that all of the drivers and the database understand.
  
  If each person had a list of things they liked which could come from multiple collections, such as
  "hobbies", "sports", "books", etc., we could use <class>MongoDBRef</class>s to keep track of what "like" went
  with what collection: Creating MongoDBRef linksselectCollection("people");
  
  // model trains are in the "hobbies" collection
  $trainRef = MongoDBRef::create("hobbies", $modelTrains['_id']);
  // soccer is in the "sports" collection
  $soccerRef = MongoDBRef::create("sports", $soccer['_id']);
  
  // now we'll know what collections the items in the "likes" array came from when
  // we retrieve this document
  $people->insert(array("name" => "Fred", "likes" => array($trainRef, $soccerRef)));
  
  ?>
  ]]>
  
  Database references can be thought of as hyperlinks: they give the unique  address of another
  document, but they do not load it or automatically follow the link/reference.
  
  A database reference is just a normal associative array, not an instance of <class>MongoDBRef</class>, so this
  class is a little different than  the other data type classes.  This class contains exclusively
  static methods  for manipulating database references.


id: MongoDBRef::create
type: function
doc:
<comment>Description:</comment>
  Creates a new database reference
  
  If no database is given, the current database is used.

<comment>Param:</comment>
  <info>string</info>  <strong>$collection</strong>  Collection name (without the database name).
  <info>mixed </info>  <strong>$id        </strong>  The _id field of the object to which to link.
  <info>string</info>  <strong>$database  </strong>  Database name.

<comment>Return:</comment>
  <info>array</info>  Returns the reference.

<comment>See Also:</comment>
   * MongoDB::createDBRef
   * MongoCollection::createDBRef


id: MongoDBRef::get
type: function
doc:
<comment>Description:</comment>
  Fetches the object pointed to by a reference

<comment>Param:</comment>
  <info>MongoDB</info>  <strong>$db </strong>  Database to use.
  <info>array  </info>  <strong>$ref</strong>  Reference to fetch.

<comment>Return:</comment>
  <info>array</info>  Returns the document to which the reference refers or <info>null</info> if the document does not exist
         (the reference is broken).

<comment>See Also:</comment>
   * MongoDB::getDBRef
   * MongoCollection::getDBRef


id: MongoDBRef::isRef
type: function
doc:
<comment>Description:</comment>
  Checks if an array is a database reference
  
  This method does not actually follow the reference, so it does not determine if it is broken or
  not.  It merely checks that <strong>$ref</strong> is in valid  database reference format (in that it is an object
  or array with $ref and $id fields).

<comment>Param:</comment>
  <info>mixed</info>  <strong>$ref</strong>  Array or object to check.

<comment>Return:</comment>
  <info>bool</info>  Întoarce valoarea <info>true</info> în cazul
        succesului sau <info>false</info> în cazul eșecului.


id: MongoDB\BSON\Binary
type: class
doc:
<comment>Description:</comment>
  BSON type for binary data (i.e. array of bytes). Binary values also have a subtype, which is used
  to indicate what kind of data is in the byte array. Subtypes from zero to 127 are predefined or
  reserved. Subtypes from 128-255 are user-defined.


id: MongoDB\BSON\Binary::TYPE_ENCRYPTED
type: constant
doc:
<comment>Description:</comment>
  Encrypted value. This subtype is used for client-side encryption.


id: MongoDB\BSON\Binary::TYPE_MD5
type: constant
doc:
<comment>Description:</comment>
  MD5 hash. When using this type, the Binary's data should be 16 bytes in length.


id: MongoDB\BSON\Binary::TYPE_OLD_BINARY
type: constant
doc:
<comment>Description:</comment>
  Generic binary data (deprecated in favor of <info>MongoDB\BSON\Binary::TYPE_GENERIC</info>).


id: MongoDB\BSON\Binary::TYPE_OLD_UUID
type: constant
doc:
<comment>Description:</comment>
  Universally unique identifier (deprecated in favor of <info>MongoDB\BSON\Binary::TYPE_UUID</info>). When using
  this type, the Binary's data should be 16 bytes in length.
  
  Historically, other drivers encoded values with this type based on their language conventions
  (e.g. varying endianness), which makes it non-portable. The PHP driver applies no special handling
  for encoding or decoding data with this type.


id: MongoDB\BSON\Binary::TYPE_USER_DEFINED
type: constant
doc:
<comment>Description:</comment>
  User-defined type. While types between 0 and 127 are predefined or reserved, types between 128 and
  255 are user-defined and may be used for anything.


id: MongoDB\BSON\Binary::TYPE_UUID
type: constant
doc:
<comment>Description:</comment>
  Universally unique identifier. When using this type, the Binary's data should be 16 bytes in
  length and encoded according to RFC 4122.


id: MongoDB\BSON\Binary::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Binary

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  Binary data.
  <info>int   </info>  <strong>$type</strong>  Unsigned 8-bit integer denoting the data's type.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Binary::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the Binary's data
  
  Această metodă este pseudonim pentru:  MongoDB\BSON\Binary::getData.

<comment>Return:</comment>
  <info>string</info>  Returns the Binary's data.

<comment>See Also:</comment>
   * MongoDB\BSON\Binary::getData
   * BSON Types


id: MongoDB\BSON\Binary::getData
type: function
doc:
<comment>Description:</comment>
  Returns the Binary's data

<comment>Return:</comment>
  <info>string</info>  Returns the Binary's data.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Binary::getType
type: function
doc:
<comment>Description:</comment>
  Returns the Binary's type

<comment>Return:</comment>
  <info>int</info>  Returns the Binary's type.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Binary::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Binary</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Binary::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Binary

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Binary</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Binary::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Binary::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Binary

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Binary</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Binary</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Binary::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\BinaryInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\Binary</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\BinaryInterface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the BinaryInterface's data
  
  Această metodă este pseudonim pentru:  MongoDB\BSON\BinaryInterface::getData.

<comment>Return:</comment>
  <info>string</info>  Returns the BinaryInterface's data.

<comment>See Also:</comment>
   * MongoDB\BSON\BinaryInterface::getData
   * MongoDB\BSON\Binary::__toString


id: MongoDB\BSON\BinaryInterface::getData
type: function
doc:
<comment>Description:</comment>
  Returns the BinaryInterface's data

<comment>Return:</comment>
  <info>string</info>  Returns the BinaryInterface's data.

<comment>See Also:</comment>
   * MongoDB\BSON\Binary::getData


id: MongoDB\BSON\BinaryInterface::getType
type: function
doc:
<comment>Description:</comment>
  Returns the BinaryInterface's type

<comment>Return:</comment>
  <info>int</info>  Returns the BinaryInterface's type.

<comment>See Also:</comment>
   * MongoDB\BSON\Binary::getType


id: MongoDB\BSON\DBPointer
type: class
doc:
<comment>Description:</comment>
  BSON type for the "DBPointer" type. This BSON type is deprecated, and this class can not be
  instantiated. It will be created from a BSON DBPointer type while converting BSON to PHP, and can
  also be converted back into BSON while storing documents in the database.


id: MongoDB\BSON\DBPointer::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new DBPointer (unused)
  
  <class>MongoDB\BSON\DBPointer</class> objects are created through conversion from a deprecated BSON type and
  cannot be constructed directly.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\DBPointer::__toString
type: function
doc:
<comment>Description:</comment>
  Returns an empty string

<comment>Return:</comment>
  <info>string</info>  Returns an empty string.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\DBPointer::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\DBPointer</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\DBPointer::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a DBPointer

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\DBPointer</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\DBPointer::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\DBPointer::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a DBPointer

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\DBPointer</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\DBPointer</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\DBPointer::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Decimal128
type: class
doc:
<comment>Description:</comment>
  BSON type for the Decimal128 floating-point format, which supports numbers with up to 34 decimal
  digits (i.e. significant digits) and an exponent range of −6143 to +6144.
  
  Unlike the double BSON type (i.e. <info>float</info> in PHP), which only stores an approximation of the decimal
  values, the decimal data type stores the exact value. For example, <return>MongoDB\BSON\Decimal128('9.99')</return>
  has a precise value of 9.99 where as a double 9.99 would have an approximate value of
  9.9900000000000002131628….
  
  <class>MongoDB\BSON\Decimal128</class> este compatibil doar cu MongoDB 3.4+. Încercarea de a utiliza tipul BSON
  cu o versiune anterioară a MongoDB va rezulta în eroare.


id: MongoDB\BSON\Decimal128::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Decimal128
  
  <class>MongoDB\BSON\Decimal128</class> este compatibil doar cu MongoDB 3.4+. Încercarea de a utiliza tipul BSON
  cu o versiune anterioară a MongoDB va rezulta în eroare.

<comment>Param:</comment>
  <info>string</info>  <strong>$value</strong>  A decimal string.

<comment>See Also:</comment>
   * Decimal128 floating-point format
   * BSON Types


id: MongoDB\BSON\Decimal128::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this Decimal128

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this Decimal128.

<comment>See Also:</comment>
   * Decimal128 floating-point format
   * BSON Types


id: MongoDB\BSON\Decimal128::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Decimal128</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Decimal128::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Decimal128

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Decimal128</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Decimal128::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Decimal128::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Decimal128

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Decimal128</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Decimal128</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Decimal128::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Decimal128Interface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\Decimal128</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\Decimal128Interface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this Decimal128Interface

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this Decimal128Interface.

<comment>See Also:</comment>
   * MongoDB\BSON\Decimal128::__toString


id: MongoDB\BSON\Int64
type: class
doc:
<comment>Description:</comment>
  BSON type for a 64-bit integer. This class cannot be instantiated and is only created during BSON
  decoding when a 64-bit integer cannot be represented as a PHP integer on a 32-bit platform.
  Versions of the driver before 1.5.0 would throw an exception when attempting to decode a 64-bit
  integer on a 32-bit platform.
  
  During BSON encoding, objects of this class will convert back to a 64-bit integer type. This
  allows 64-bit integers to be roundtripped through a 32-bit PHP environment without any loss of
  precision. The __toString() method allows the 64-bit integer value to be accessed as a string.
  
  This class exists purely for 32-bit platforms. Applications on 64-bit platforms (i.e. <info>PHP_INT_SIZE</info>
  is 8) should never encounter this class during normal operation.


id: MongoDB\BSON\Int64::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Int64 (unused)
  
  <class>MongoDB\BSON\Int64</class> objects are created through conversion from a 64-bit integer BSON type on a
  32-bit platform and cannot be constructed directly.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Int64::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this Int64

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this Int64.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Int64::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Int64</class>.
         
         The output is consistent with the <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> function, which
         uses the canonical extended JSON format. This differs from other BSON classes, which use
         the driver-specific legacy extended JSON format (<strong>MongoDB\BSON\toJSON()</strong>), in order to ensure
         that the 64-bit integer value is correctly represented on 32-bit platforms.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Int64::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize an Int64

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Int64</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Int64::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Int64::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize an Int64

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Int64</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Int64</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Int64::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Javascript
type: class
doc:
<comment>Description:</comment>
  BSON type for Javascript code. An optional scope document may be specified that maps identifiers
  to values and defines the scope in which the code should be evaluated by the server.
  
  This BSON type is mainly used when executing database commands that take a Javascript function as
  a parameter, such as mapReduce.


id: MongoDB\BSON\Javascript::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Javascript

<comment>Param:</comment>
  <info>string     </info>  <strong>$code </strong>  Javascript code.
  <info>arrayobject</info>  <strong>$scope</strong>  Javascript scope.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Javascript::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the Javascript's code
  
  Această metodă este pseudonim pentru:  MongoDB\BSON\Javascript::getCode.

<comment>Return:</comment>
  <info>string</info>  Returns the Javascript's code.

<comment>See Also:</comment>
   * MongoDB\BSON\Javascript::getCode
   * BSON Types


id: MongoDB\BSON\Javascript::getCode
type: function
doc:
<comment>Description:</comment>
  Returns the Javascript's code

<comment>Return:</comment>
  <info>string</info>  Returns the Javascript's code.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Javascript::getScope
type: function
doc:
<comment>Description:</comment>
  Returns the Javascript's scope document

<comment>Return:</comment>
  <info>objectnull</info>  Returns the Javascript's scope document, or <info>null</info> if the is no scope.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Javascript::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Javascript</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Javascript::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Javascript

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Javascript</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Javascript::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Javascript::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Javascript

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Javascript</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Javascript</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Javascript::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\JavascriptInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\Javascript</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\JavascriptInterface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the JavascriptInterface's code
  
  Această metodă este pseudonim pentru:  MongoDB\BSON\JavascriptInterface::getCode.

<comment>Return:</comment>
  <info>string</info>  Returns the JavascriptInterface's code.

<comment>See Also:</comment>
   * MongoDB\BSON\JavascriptInterface::getCode
   * MongoDB\BSON\Javascript::__toString


id: MongoDB\BSON\JavascriptInterface::getCode
type: function
doc:
<comment>Description:</comment>
  Returns the JavascriptInterface's code

<comment>Return:</comment>
  <info>string</info>  Returns the JavascriptInterface's code.

<comment>See Also:</comment>
   * MongoDB\BSON\Javascript::getCode


id: MongoDB\BSON\JavascriptInterface::getScope
type: function
doc:
<comment>Description:</comment>
  Returns the JavascriptInterface's scope document

<comment>Return:</comment>
  <info>objectnull</info>  Returns the JavascriptInterface's scope document.

<comment>See Also:</comment>
   * MongoDB\BSON\Javascript::getScope


id: MongoDB\BSON\MaxKey
type: class
doc:
<comment>Description:</comment>
  Special BSON type which compares higher than all other possible BSON element values.
  
  This is an internal MongoDB type used for indexing and sharding.


id: MongoDB\BSON\MaxKey::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new MaxKey

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\MaxKey::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\MaxKey</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\MaxKey::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a MaxKey

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\MaxKey</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\MaxKey::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\MaxKey::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a MaxKey

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\MaxKey</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\MaxKey</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\MaxKey::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\MaxKeyInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\MaxKey</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\MinKey
type: class
doc:
<comment>Description:</comment>
  Special BSON type which compares lower than all other possible BSON element values.
  
  This is an internal MongoDB type used for indexing and sharding.


id: MongoDB\BSON\MinKey::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new MinKey

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\MinKey::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\MinKey</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\MinKey::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a MinKey

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\MinKey</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\MinKey::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\MinKey::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a MinKey

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\MinKey</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\MinKey</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\MinKey::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\MinKeyInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\MinKey</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\ObjectId
type: class
doc:
<comment>Description:</comment>
  BSON type for an ObjectId. The value consists of 12 bytes, where the first four bytes are a
  timestamp that reflect the ObjectId's creation. Specifically, the value consists of:
  
  a 4-byte value representing the seconds since the Unix epoch,
  
  a 5-byte random number unique to a machine and process, and
  
  a 3-byte counter, starting with a random value.
  
  In MongoDB, each document stored in a collection requires a unique <return>_id</return> field that acts as a
  primary key. If an inserted document omits the <return>_id</return> field, the driver automatically generates an
  ObjectId for the <return>_id</return> field.
  
  Using ObjectIds for the <return>_id</return> field provides the following additional benefits:
  
  The creation time of the ObjectId may be accessed using the MongoDB\BSON\ObjectId::getTimestamp
  method.
  
  Sorting on an <return>_id</return> field that stores ObjectId values is roughly equivalent to sorting by creation
  time.


id: MongoDB\BSON\ObjectId::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new ObjectId

<comment>Param:</comment>
  <info>string</info>  <strong>$id</strong>  A 24-character hexadecimal string. If not provided, the driver will generate an
               ObjectId.

<comment>See Also:</comment>
   * ObjectId Reference
   * BSON Types: ObjectId


id: MongoDB\BSON\ObjectId::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the hexidecimal representation of this ObjectId

<comment>Return:</comment>
  <info>string</info>  Returns the hexidecimal representation of this ObjectId.

<comment>See Also:</comment>
   * ObjectId Reference
   * BSON Types: ObjectId


id: MongoDB\BSON\ObjectId::getTimestamp
type: function
doc:
<comment>Description:</comment>
  Returns the timestamp component of this ObjectId
  
  The timestamp component of an ObjectId is its most significant 32 bits, which denotes the number
  of seconds since the Unix epoch. This value is read as an unsigned 32-bit integer with big-endian
  byte order.
  
  Deoarece tipul întreg al PHP este cu semn, unele valori întoarse de această metodă pot apărea ca
  numere întregi negative pe platforme pe 32 de biți. Opțiunea de formatare <return>"%u"</return> a funcției
  <strong>sprintf()</strong> poate fi utilizată pentru a obține reprezentarea valorii întregi fără semn ca șir de
  caractere.

<comment>Return:</comment>
  <info>int</info>  Returns the timestamp component of this ObjectId.

<comment>See Also:</comment>
   * ObjectId Reference
   * BSON Types: ObjectId


id: MongoDB\BSON\ObjectId::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\ObjectId</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\ObjectId::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize an ObjectId

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\ObjectId</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\ObjectId::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\ObjectId::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize an ObjectId

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\ObjectId</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\ObjectId</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\ObjectId::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\ObjectIdInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\ObjectId</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\ObjectIdInterface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the hexidecimal representation of this ObjectIdInterface

<comment>Return:</comment>
  <info>string</info>  Returns the hexidecimal representation of this ObjectIdInterface.

<comment>See Also:</comment>
   * MongoDB\BSON\ObjectId::__toString


id: MongoDB\BSON\ObjectIdInterface::getTimestamp
type: function
doc:
<comment>Description:</comment>
  Returns the timestamp component of this ObjectIdInterface

<comment>Return:</comment>
  <info>int</info>  Returns the timestamp component of this ObjectIdInterface.

<comment>See Also:</comment>
   * MongoDB\BSON\ObjectId::getTimestamp


id: MongoDB\BSON\Persistable
type: class
doc:
<comment>Description:</comment>
  Classes may implement this interface to take advantage of automatic ODM (object document mapping)
  behavior in the driver. During serialization, the driver will inject a __pclass property
  containing the PHP class name into the data returned by
  <strong>MongoDB\BSON\Serializable::bsonSerialize()</strong>. During unserialization, the same __pclass property
  will then be used to infer the PHP class (independent of any type map configuration) to be
  constructed before <strong>MongoDB\BSON\Unserializable::bsonUnserialize()</strong> is invoked. See  for additional
  information.
  
  Even if <strong>MongoDB\BSON\Serializable::bsonSerialize()</strong> would return a sequential array, injection of
  the __pclass property will cause the object to be serialized as a BSON document.


id: MongoDB\BSON\Regex
type: class
doc:
<comment>Description:</comment>
  BSON type for a regular expression pattern and optional flags.
  
  This BSON type is mainly used when querying the database. Alternatively, the $regex query operator
  may be used.


id: MongoDB\BSON\Regex::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Regex

<comment>Param:</comment>
  <info>string</info>  <strong>$pattern</strong>  The regular expression pattern.
                    
                    The pattern should not be wrapped with delimiter characters.
  <info>string</info>  <strong>$flags  </strong>  The regular expression flags. Characters in this argument will be sorted
                    alphabetically.

<comment>See Also:</comment>
   * BSON Types
   * Supported regular expression flags


id: MongoDB\BSON\Regex::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this Regex

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this Regex.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Regex::getFlags
type: function
doc:
<comment>Description:</comment>
  Returns the Regex's flags

<comment>Return:</comment>
  <info>string</info>  Returns the Regex's flags.

<comment>See Also:</comment>
   * BSON Types
   * Supported regular expression flags


id: MongoDB\BSON\Regex::getPattern
type: function
doc:
<comment>Description:</comment>
  Returns the Regex's pattern

<comment>Return:</comment>
  <info>string</info>  Returns the Regex's pattern.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Regex::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Regex</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Regex::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Regex

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Regex</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Regex::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Regex::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Regex

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Regex</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Regex</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Regex::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\RegexInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\Regex</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\RegexInterface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this RegexInterface

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this RegexInterface.

<comment>See Also:</comment>
   * MongoDB\BSON\Regex::__toString


id: MongoDB\BSON\RegexInterface::getFlags
type: function
doc:
<comment>Description:</comment>
  Returns the RegexInterface's flags

<comment>Return:</comment>
  <info>string</info>  Returns the RegexInterface's flags.

<comment>See Also:</comment>
   * MongoDB\BSON\Regex::getFlags


id: MongoDB\BSON\RegexInterface::getPattern
type: function
doc:
<comment>Description:</comment>
  Returns the RegexInterface's pattern

<comment>Return:</comment>
  <info>string</info>  Returns the RegexInterface's pattern.

<comment>See Also:</comment>
   * MongoDB\BSON\Regex::getPattern


id: MongoDB\BSON\Serializable
type: class
doc:
<comment>Description:</comment>
  Classes that implement this interface may return data to be serialized as a BSON array or document
  in lieu of the object's public properties.


id: MongoDB\BSON\Serializable::bsonSerialize
type: function
doc:
<comment>Description:</comment>
  Provides an array or document to serialize as BSON
  
  Called during serialization of the object to BSON. The method must return an <info>array</info> or <class>stdClass</class>.
  
  Root documents (e.g. a MongoDB\BSON\Serializable passed to <strong>MongoDB\BSON\fromPHP()</strong>) will always be
  serialized as a BSON document. For field values, associative arrays and <class>stdClass</class> instances will be
  serialized as a BSON document and sequential arrays (i.e. sequential, numeric indexes starting at
  <return>0</return>) will be serialized as a BSON array.
  
  Users are encouraged to include an _id property (e.g. a <class>MongoDB\BSON\ObjectId</class> initialized in your
  constructor) when returning data for a BSON root document; otherwise, the driver or database will
  need to generate a <class>MongoDB\BSON\ObjectId</class> when inserting or upserting the document, respectively.

<comment>Return:</comment>
  <info>arrayobject</info>  An <info>array</info> or <class>stdClass</class> to be serialized as a BSON array or document.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\Unserializable::bsonUnserialize()</strong>
   * MongoDB\BSON\Persistable
   * 


id: MongoDB\BSON\Symbol
type: class
doc:
<comment>Description:</comment>
  BSON type for the "Symbol" type. This BSON type is deprecated, and this class can not be
  instantiated. It will be created from a BSON symbol type while converting BSON to PHP, and can
  also be converted back into BSON while storing documents in the database.


id: MongoDB\BSON\Symbol::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Symbol (unused)
  
  <class>MongoDB\BSON\Symbol</class> objects are created through conversion from a deprecated BSON type and cannot
  be constructed directly.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Symbol::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the Symbol as a string

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this Symbol.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Symbol::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Symbol</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Symbol::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Symbol

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Symbol</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Symbol::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Symbol::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Symbol

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Symbol</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Symbol</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Symbol::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Timestamp
type: class
doc:
<comment>Description:</comment>
  Represents a BSON timestamp, The value consists of a 4-byte timestamp (i.e. seconds since the
  epoch) and a 4-byte increment.
  
  This is an internal MongoDB type used for replication and sharding. It is not intended for general
  date storage (<class>MongoDB\BSON\UTCDateTime</class> should be used instead).


id: MongoDB\BSON\Timestamp::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Timestamp

<comment>Param:</comment>
  <info>int</info>  <strong>$increment</strong>  32-bit integer denoting the incrementing ordinal for operations within a given
                   second.
  <info>int</info>  <strong>$timestamp</strong>  32-bit integer denoting seconds since the Unix epoch.

<comment>See Also:</comment>
   * BSON Types: Timestamps


id: MongoDB\BSON\Timestamp::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this Timestamp

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this Timestamp.

<comment>See Also:</comment>
   * BSON Types: Timestamps


id: MongoDB\BSON\Timestamp::getIncrement
type: function
doc:
<comment>Description:</comment>
  Returns the increment component of this Timestamp
  
  The increment component of a Timestamp is its least significant 32 bits, whichs denotes the
  incrementing ordinal for operations within a given second. This value is read as an unsigned
  32-bit integer with big-endian byte order.
  
  Deoarece tipul întreg al PHP este cu semn, unele valori întoarse de această metodă pot apărea ca
  numere întregi negative pe platforme pe 32 de biți. Opțiunea de formatare <return>"%u"</return> a funcției
  <strong>sprintf()</strong> poate fi utilizată pentru a obține reprezentarea valorii întregi fără semn ca șir de
  caractere.

<comment>Return:</comment>
  <info>int</info>  Returns the increment component of this Timestamp.
       
       On 32-bit systems this method may return a negative number. Although the increment and
       timestamp parts of the BSON timestamp type consists of two unsigned 32-bit values, PHP can
       not represent these on 32-bit platforms.

<comment>See Also:</comment>
   * BSON Types: Timestamps


id: MongoDB\BSON\Timestamp::getTimestamp
type: function
doc:
<comment>Description:</comment>
  Returns the timestamp component of this Timestamp
  
  The timestamp component of a Timestamp is its most significant 32 bits, which denotes the number
  of seconds since the Unix epoch. This value is read as an unsigned 32-bit integer with big-endian
  byte order.
  
  Deoarece tipul întreg al PHP este cu semn, unele valori întoarse de această metodă pot apărea ca
  numere întregi negative pe platforme pe 32 de biți. Opțiunea de formatare <return>"%u"</return> a funcției
  <strong>sprintf()</strong> poate fi utilizată pentru a obține reprezentarea valorii întregi fără semn ca șir de
  caractere.

<comment>Return:</comment>
  <info>int</info>  Returns the timestamp component of this Timestamp.
       
       On 32-bit systems this method may return a negative number. Although the increment and
       timestamp parts of the BSON timestamp type consists of two unsigned 32-bit values, PHP can
       not represent these on 32-bit platforms.

<comment>See Also:</comment>
   * BSON Types: Timestamps


id: MongoDB\BSON\Timestamp::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Timestamp</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Timestamp::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Timestamp

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Timestamp</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Timestamp::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Timestamp::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Timestamp

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Timestamp</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Timestamp</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Timestamp::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\TimestampInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\Timestamp</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\BSON\TimestampInterface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this TimestampInterface

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this TimestampInterface.

<comment>See Also:</comment>
   * MongoDB\BSON\Timestamp::__toString


id: MongoDB\BSON\TimestampInterface::getIncrement
type: function
doc:
<comment>Description:</comment>
  Returns the increment component of this TimestampInterface

<comment>Return:</comment>
  <info>int</info>  Returns the increment component of this TimestampInterface.
       
       On 32-bit systems this method may return a negative number. Although the increment and
       timestamp parts of the BSON timestamp type consists of two unsigned 32-bit values, PHP can
       not represent these on 32-bit platforms.

<comment>See Also:</comment>
   * MongoDB\BSON\Timestamp::getIncrement


id: MongoDB\BSON\TimestampInterface::getTimestamp
type: function
doc:
<comment>Description:</comment>
  Returns the timestamp component of this TimestampInterface

<comment>Return:</comment>
  <info>int</info>  Returns the timestamp component of this TimestampInterface.
       
       On 32-bit systems this method may return a negative number. Although the increment and
       timestamp parts of the BSON timestamp type consists of two unsigned 32-bit values, PHP can
       not represent these on 32-bit platforms.

<comment>See Also:</comment>
   * MongoDB\BSON\Timestamp::getTimestamp


id: MongoDB\BSON\UTCDateTime
type: class
doc:
<comment>Description:</comment>
  Represents a BSON date. The value is a 64-bit integer that represents the number of milliseconds
  since the Unix epoch (Jan 1, 1970). Negative values represent dates before 1970.


id: MongoDB\BSON\UTCDateTime::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new UTCDateTime

<comment>Param:</comment>
  <info>intfloatstringDateTimeInterface</info>  <strong>$milliseconds</strong>  Number of milliseconds since the Unix epoch (Jan
                                                  1, 1970). Negative values represent dates before
                                                  1970. This value may be provided as a 64-bit <info>int</info>.
                                                  For compatibility on 32-bit systems, this
                                                  parameter may also be provided as a <info>float</info> or
                                                  <info>string</info>.
                                                  
                                                  If the argument is a <class>DateTimeInterface</class>, the number
                                                  of milliseconds since the Unix epoch will be
                                                  derived from that value. Note that in versions of
                                                  PHP versions before 7.1.0, <class>DateTime</class> and
                                                  <class>DateTimeImmutable</class> objects constructed from the
                                                  current time did not incorporate sub-second
                                                  precision.
                                                  
                                                  If this argument is <info>null</info>, the current time will be
                                                  used by default.

<comment>See Also:</comment>
   * BSON Types: Date


id: MongoDB\BSON\UTCDateTime::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this UTCDateTime

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this UTCDateTime.

<comment>See Also:</comment>
   * BSON Types: Date


id: MongoDB\BSON\UTCDateTime::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\UTCDateTime</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\UTCDateTime::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a UTCDateTime

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\UTCDateTime</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\UTCDateTime::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\UTCDateTime::toDateTime
type: function
doc:
<comment>Description:</comment>
  Returns the DateTime representation of this UTCDateTime

<comment>Return:</comment>
  <info>DateTime</info>  Returns the <class>DateTime</class> representation of this UTCDateTime. The returned <class>DateTime</class> will use
            the UTC time zone.

<comment>See Also:</comment>
   * BSON Types: Date


id: MongoDB\BSON\UTCDateTime::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a UTCDateTime

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\UTCDateTime</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\UTCDateTime</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\UTCDateTime::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\UTCDateTimeInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\BSON\UTCDateTime</class> but may also be used for type-hinting
  and userland classes.


id: MongoDB\BSON\UTCDateTimeInterface::__toString
type: function
doc:
<comment>Description:</comment>
  Returns the string representation of this UTCDateTimeInterface

<comment>Return:</comment>
  <info>string</info>  Returns the string representation of this UTCDateTimeInterface.

<comment>See Also:</comment>
   * MongoDB\BSON\UTCDateTime::__toString


id: MongoDB\BSON\UTCDateTimeInterface::toDateTime
type: function
doc:
<comment>Description:</comment>
  Returns the DateTime representation of this UTCDateTimeInterface

<comment>Return:</comment>
  <info>DateTime</info>  Returns the <class>DateTime</class> representation of this UTCDateTimeInterface. The returned <class>DateTime</class>
            should use the UTC time zone.

<comment>See Also:</comment>
   * MongoDB\BSON\UTCDateTime::toDateTime


id: MongoDB\BSON\Undefined
type: class
doc:
<comment>Description:</comment>
  BSON type for the "Undefined" type. This BSON type is deprecated, and this class can not be
  instantiated. It will be created from a BSON undefined type while converting BSON to PHP, and can
  also be converted back into BSON while storing documents in the database.


id: MongoDB\BSON\Undefined::__construct
type: function
doc:
<comment>Description:</comment>
  Construct a new Undefined (unused)
  
  <class>MongoDB\BSON\Undefined</class> objects are created through conversion from a deprecated BSON type and
  cannot be constructed directly.

<comment>See Also:</comment>
   * BSON Types


id: MongoDB\BSON\Undefined::jsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns a representation that can be converted to JSON

<comment>Return:</comment>
  <info>mixed</info>  Returns data which can be serialized by <strong>json_encode()</strong> to produce an extended JSON
         representation of the <class>MongoDB\BSON\Undefined</class>.
         
         Valoarea întoarsă este consistentă cu cea a funcției <strong>MongoDB\BSON\toJSON()</strong>, care utilizează
         formatul JSON extins moștenit, specific driver-ului. Aceasta nu corespunde în mod necesar
         cu reprezentările extinse JSON relaxed sau canonical utilizate de
         <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong> și <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> respectiv.

<comment>See Also:</comment>
   * JsonSerializable::jsonSerialize
   * <strong>json_encode()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON


id: MongoDB\BSON\Undefined::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a Undefined

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\BSON\Undefined</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Undefined::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Undefined::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a Undefined

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\BSON\Undefined</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\BSON\Undefined</class>.

<comment>See Also:</comment>
   * MongoDB\BSON\Undefined::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\BSON\Unserializable
type: class
doc:
<comment>Description:</comment>
  Classes that implement this interface may be specified in a type map for unserializing BSON arrays
  and documents (both root and embedded).


id: MongoDB\BSON\Unserializable::bsonUnserialize
type: function
doc:
<comment>Description:</comment>
  Constructs the object from a BSON array or document
  
  Called during unserialization of the object from BSON. The properties of the BSON array or
  document will be passed to the method as an <info>array</info>.
  
  Remember to check for an _id property when handling data from a BSON document.
  
  This method acts as the constructor of the object. The __construct() method will not be called
  after this method.

<comment>Param:</comment>
  <info>array</info>  <strong>$data</strong>  Properties within the BSON array or document.

<comment>Return:</comment>
  <info>void</info>  The return value from this method is ignored.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\Serializable::bsonSerialize()</strong>
   * MongoDB\BSON\Persistable
   * 


id: MongoDB\BSON\fromJSON
type: function
doc:
<comment>Description:</comment>
  Returns the BSON representation of a JSON value
  
  Converts an extended JSON string to its BSON representation.

<comment>Param:</comment>
  <info>string</info>  <strong>$json</strong>  JSON value to be converted.

<comment>Return:</comment>
  <info>string</info>  The serialized BSON document as a binary string.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\toJSON()</strong>
   * MongoDB Extended JSON
   * MongoDB BSON


id: MongoDB\BSON\fromPHP
type: function
doc:
<comment>Description:</comment>
  Returns the BSON representation of a PHP value
  
  Serializes a PHP array or object (e.g. document) to its BSON representation. The returned binary
  string will describe a BSON document.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$value</strong>  PHP value to be serialized.

<comment>Return:</comment>
  <info>string</info>  The serialized BSON document as a binary string.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\toPHP()</strong>
   * MongoDB BSON
   * 


id: MongoDB\BSON\toCanonicalExtendedJSON
type: function
doc:
<comment>Description:</comment>
  Returns the Canonical Extended JSON representation of a BSON value
  
  Converts a BSON string to its Canonical Extended JSON representation. The canonical format prefers
  type fidelity at the expense of concise output and is most suited for producing output that can be
  converted back to BSON without any loss of type information (e.g. numeric types will remain
  differentiated).

<comment>Param:</comment>
  <info>string</info>  <strong>$bson</strong>  BSON value to be converted.

<comment>Return:</comment>
  <info>string</info>  The converted JSON value.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\fromJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * Extended JSON Specification
   * MongoDB BSON


id: MongoDB\BSON\toJSON
type: function
doc:
<comment>Description:</comment>
  Returns the Legacy Extended JSON representation of a BSON value
  
  Converts a BSON string to its Legacy Extended JSON representation.
  
  There exist several JSON formats for representing BSON. This function implements the "strict mode"
  defined in MongoDB Extended JSON, which has been superseded by the canonical and relaxed formats
  defined in the Extended JSON Specification and implemented by
  <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> and <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>, respectively.
  
  JSON does not support <info>NAN</info> and <info>INF</info> and MongoDB's Legacy Extended JSON format does not define an
  alternative representation for these values (libbson will output <return>nan</return> and <return>inf</return> literals, which may
  not be parsed as valid JSON). If you are working with BSON that may contain non-finite numbers,
  please use <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong> or <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>.

<comment>Param:</comment>
  <info>string</info>  <strong>$bson</strong>  BSON value to be converted.

<comment>Return:</comment>
  <info>string</info>  The converted JSON value.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\fromJSON()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * <strong>MongoDB\BSON\toRelaxedExtendedJSON()</strong>
   * MongoDB Extended JSON
   * MongoDB BSON


id: MongoDB\BSON\toPHP
type: function
doc:
<comment>Description:</comment>
  Returns the PHP representation of a BSON value
  
  Unserializes a BSON document (i.e. binary string) to its PHP representation. The <strong>$typeMap</strong>
  paramater may be used to control the PHP types used for converting BSON arrays and documents (both
  root and embedded).
  
  Fields containing deprecated BSON types (i.e. undefined, symbol, DBPointer) are represented only
  by bare-bones objects of the classes <class>MongoDB\BSON\Undefined</class>, <class>MongoDB\BSON\Symbol</class>, and
  <class>MongoDB\BSON\DBPointer</class>, when converting BSON to PHP. These objects are created from BSON data and
  used for storing these types back into the database, but can not be instantiated as they have a
  private constructor.

<comment>Param:</comment>
  <info>string</info>  <strong>$bson   </strong>  BSON value to be unserialized.
  <info>array </info>  <strong>$typeMap</strong>  configurația Type map.

<comment>Return:</comment>
  <info>arrayobject</info>  The unserialized PHP value.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\fromPHP()</strong>
   * MongoDB BSON
   * 


id: MongoDB\BSON\toRelaxedExtendedJSON
type: function
doc:
<comment>Description:</comment>
  Returns the Relaxed Extended JSON representation of a BSON value
  
  Converts a BSON string to its Relaxed Extended JSON representation. The relaxed format prefers use
  of JSON type primitives at the expense of type fidelity and is most suited for producing output
  that can be easily consumed by web APIs and humans.

<comment>Param:</comment>
  <info>string</info>  <strong>$bson</strong>  BSON value to be converted.

<comment>Return:</comment>
  <info>string</info>  The converted JSON value.

<comment>See Also:</comment>
   * <strong>MongoDB\BSON\fromJSON()</strong>
   * <strong>MongoDB\BSON\toCanonicalExtendedJSON()</strong>
   * Extended JSON 
   * MongoDB BSON


id: MongoDB\Driver\BulkWrite
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\BulkWrite</class> collects one or more write operations that should be sent to the
  server. After adding any number of insert, update, and delete operations, the collection may be
  executed via MongoDB\Driver\Manager::executeBulkWrite.
  
  Write operations may either be ordered (default) or unordered. Ordered write operations are sent
  to the server, in the order provided, for serial execution. If a write fails, any remaining
  operations will be aborted. Unordered operations are sent to the server in an arbitrary order
  where they may be executed in parallel. Any errors that occur are reported after all operations
  have been attempted.


id: MongoDB\Driver\BulkWrite::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new BulkWrite
  
  Constructs a new <class>MongoDB\Driver\BulkWrite</class>, which is a mutable object to which one or more write
  operations may be added. The write(s) may then be executed with
  MongoDB\Driver\Manager::executeBulkWrite.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  optionsOptionTypeDescriptionDefaultbypassDocumentValidation<info>bool</info> If <info>true</info>, allows
                   insert and update operations to circumvent document level validation.  This
                   option is available in MongoDB 3.2+ and is ignored for older server versions,
                   which do not support document level validation. <info>false</info>ordered<info>bool</info> Ordered
                   operations (<info>true</info>) are executed serially on the MongoDB server, while unordered
                   operations (<info>false</info>) are sent to the server in an arbitrary order and may be
                   executed in parallel. <info>true</info>
                   
                   If <info>true</info>, allows insert and update operations to circumvent document level
                   validation.
                   
                   This option is available in MongoDB 3.2+ and is ignored for older server
                   versions, which do not support document level validation.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::executeBulkWrite
   * <class>MongoDB\Driver\WriteResult</class>


id: MongoDB\Driver\BulkWrite::count
type: function
doc:
<comment>Description:</comment>
  Count number of write operations in the bulk
  
  Returns the number of write operations added to the <class>MongoDB\Driver\BulkWrite</class> object.

<comment>Return:</comment>
  <info>int</info>  Returns number of write operations added to the <class>MongoDB\Driver\BulkWrite</class> object.


id: MongoDB\Driver\BulkWrite::delete
type: function
doc:
<comment>Description:</comment>
  Add a delete operation to the bulk
  
  Adds a delete operation to the <class>MongoDB\Driver\BulkWrite</class>.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$filter       </strong>  predicatul interpelării. Un predicat vid se va potrivi cu toate
                               documentele din colecție.
                               
                               La evaluarea criteriilor interpelării MongoDB compară tipurile și
                               valorile conform propriilor reguli de comparație pentru tipuri BSON,
                               care diferă de regulile PHP de comparare și substituirea tipurilor.
                               La potrivirea unui tip special BSON criteriile interpelării trebuie
                               să utilizeze clasa BSON respectivă (de ex. trebuie utilizat
                               <class>MongoDB\BSON\ObjectId</class> pentru a potrivi un ObjectId).
  <info>array      </info>  <strong>$deleteOptions</strong>  
                               deleteOptionsOptionTypeDescriptionDefaultcollation<info>array</info><info>object</info></info>Collation
                               permite utilizatorilor să indice reguli specifice limbii pentru
                               comparații ale șirurilor de caractere cum ar fi reguli pentru
                               caractere minuscule, majuscule, cu accente. La specificarea collation
                               câmpul <return>"locale"</return> este obligatoriu; restul câmpurilor collation sunt
                               opționale. Pentru descrierile câmpurilor a se vedea Collation
                               Document.  Dacă collation nu este specificat, dar colecția are un
                               collation implicit, atunci operațiunea folosește collation specificat
                               pentru colecție. Dacă nu este specificat un collation pentru colecție
                               sau pentru operație, MongoDB folosește comparația binară simplă, ca
                               în versiunile anterioare, pentru compararea șirurilor de caractere.
                               Această opțiune este disponibilă în MongoDB 3.4+ și va rezulta într-o
                               excepție în timpul execuției dacă este specificată pentru o versiune
                               mai veche a serverului. hint<info>string</info><info>array</info><info>object</info></info> Index specification.
                               Specify either the index name as a string or the index key pattern.
                               If specified, then the query system will only consider plans using
                               the hinted index.  This option is available in MongoDB 4.4+ and will
                               result in an exception at execution time if specified for an older
                               server version. limit<info>bool</info>Delete all matching documents (<info>false</info>), or
                               only the first matching document (<info>true</info>)<info>false</info>
                               
                               Collation permite utilizatorilor să indice reguli specifice limbii
                               pentru comparații ale șirurilor de caractere cum ar fi reguli pentru
                               caractere minuscule, majuscule, cu accente. La specificarea collation
                               câmpul <return>"locale"</return> este obligatoriu; restul câmpurilor collation sunt
                               opționale. Pentru descrierile câmpurilor a se vedea Collation
                               Document.
                               
                               Dacă collation nu este specificat, dar colecția are un collation
                               implicit, atunci operațiunea folosește collation specificat pentru
                               colecție. Dacă nu este specificat un collation pentru colecție sau
                               pentru operație, MongoDB folosește comparația binară simplă, ca în
                               versiunile anterioare, pentru compararea șirurilor de caractere.
                               
                               Această opțiune este disponibilă în MongoDB 3.4+ și va rezulta într-o
                               excepție în timpul execuției dacă este specificată pentru o versiune
                               mai veche a serverului.
                               
                               Index specification. Specify either the index name as a string or the
                               index key pattern. If specified, then the query system will only
                               consider plans using the hinted index.
                               
                               This option is available in MongoDB 4.4+ and will result in an
                               exception at execution time if specified for an older server version.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::executeBulkWrite
   * <class>MongoDB\Driver\WriteResult</class>


id: MongoDB\Driver\BulkWrite::insert
type: function
doc:
<comment>Description:</comment>
  Add an insert operation to the bulk
  
  Adds an insert operation to the <class>MongoDB\Driver\BulkWrite</class>.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$document</strong>  A document to insert.

<comment>Return:</comment>
  <info>mixed</info>  Returns the <return>_id</return> of the inserted document. If the <strong>$document</strong> did not have an <return>_id</return>, the
         <class>MongoDB\BSON\ObjectId</class> generated for the insert will be returned.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::executeBulkWrite
   * <class>MongoDB\Driver\WriteResult</class>
   * <class>MongoDB\BSON\ObjectId</class>
   * MongoDB\BSON\Persistable


id: MongoDB\Driver\BulkWrite::update
type: function
doc:
<comment>Description:</comment>
  Add an update operation to the bulk
  
  Adds an update operation to the <class>MongoDB\Driver\BulkWrite</class>.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$filter       </strong>  predicatul interpelării. Un predicat vid se va potrivi cu toate
                               documentele din colecție.
                               
                               La evaluarea criteriilor interpelării MongoDB compară tipurile și
                               valorile conform propriilor reguli de comparație pentru tipuri BSON,
                               care diferă de regulile PHP de comparare și substituirea tipurilor.
                               La potrivirea unui tip special BSON criteriile interpelării trebuie
                               să utilizeze clasa BSON respectivă (de ex. trebuie utilizat
                               <class>MongoDB\BSON\ObjectId</class> pentru a potrivi un ObjectId).
  <info>arrayobject</info>  <strong>$newObj       </strong>  A document containing either update operators (e.g. <return>$set</return>), a
                               replacement document (i.e. only <return>field:value</return> expressions), or an
                               aggregation pipeline.
  <info>array      </info>  <strong>$updateOptions</strong>  updateOptionsOptionTypeDescriptionDefaultarrayFilters<info>array</info> An array
                               of filter documents that determines which array elements to modify
                               for an update operation on an array field. See Specify arrayFilters
                               for Array Update Operations in the MongoDB manual for more
                               information.  This option is available in MongoDB 3.6+ and will
                               result in an exception at execution time if specified for an older
                               server version. collation<info>array</info><info>object</info></info>Collation permite utilizatorilor
                               să indice reguli specifice limbii pentru comparații ale șirurilor de
                               caractere cum ar fi reguli pentru caractere minuscule, majuscule, cu
                               accente. La specificarea collation câmpul <return>"locale"</return> este obligatoriu;
                               restul câmpurilor collation sunt opționale. Pentru descrierile
                               câmpurilor a se vedea Collation Document.  Dacă collation nu este
                               specificat, dar colecția are un collation implicit, atunci
                               operațiunea folosește collation specificat pentru colecție. Dacă nu
                               este specificat un collation pentru colecție sau pentru operație,
                               MongoDB folosește comparația binară simplă, ca în versiunile
                               anterioare, pentru compararea șirurilor de caractere.  Această
                               opțiune este disponibilă în MongoDB 3.4+ și va rezulta într-o
                               excepție în timpul execuției dacă este specificată pentru o versiune
                               mai veche a serverului. hint<info>string</info><info>array</info><info>object</info></info> Index specification.
                               Specify either the index name as a string or the index key pattern.
                               If specified, then the query system will only consider plans using
                               the hinted index.  This option is available in MongoDB 4.2+ and will
                               result in an exception at execution time if specified for an older
                               server version. multi<info>bool</info> Update only the first matching document if
                               <info>false</info>, or all matching documents <info>true</info>. This option cannot be <info>true</info> if
                               <strong>$newObj</strong> is a replacement document. <info>false</info>upsert<info>bool</info> If <strong>$filter</strong> does
                               not match an existing document, insert a single document. The
                               document will be created from <strong>$newObj</strong> if it is a replacement document
                               (i.e. no update operators); otherwise, the operators in <strong>$newObj</strong> will
                               be applied to <strong>$filter</strong> to create the new document. <info>false</info>
                               
                               An array of filter documents that determines which array elements to
                               modify for an update operation on an array field. See Specify
                               arrayFilters for Array Update Operations in the MongoDB manual for
                               more information.
                               
                               This option is available in MongoDB 3.6+ and will result in an
                               exception at execution time if specified for an older server version.
                               
                               Collation permite utilizatorilor să indice reguli specifice limbii
                               pentru comparații ale șirurilor de caractere cum ar fi reguli pentru
                               caractere minuscule, majuscule, cu accente. La specificarea collation
                               câmpul <return>"locale"</return> este obligatoriu; restul câmpurilor collation sunt
                               opționale. Pentru descrierile câmpurilor a se vedea Collation
                               Document.
                               
                               Dacă collation nu este specificat, dar colecția are un collation
                               implicit, atunci operațiunea folosește collation specificat pentru
                               colecție. Dacă nu este specificat un collation pentru colecție sau
                               pentru operație, MongoDB folosește comparația binară simplă, ca în
                               versiunile anterioare, pentru compararea șirurilor de caractere.
                               
                               Această opțiune este disponibilă în MongoDB 3.4+ și va rezulta într-o
                               excepție în timpul execuției dacă este specificată pentru o versiune
                               mai veche a serverului.
                               
                               Index specification. Specify either the index name as a string or the
                               index key pattern. If specified, then the query system will only
                               consider plans using the hinted index.
                               
                               This option is available in MongoDB 4.2+ and will result in an
                               exception at execution time if specified for an older server version.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::executeBulkWrite
   * <class>MongoDB\Driver\WriteResult</class>


id: MongoDB\Driver\ClientEncryption
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\ClientEncryption</class> class handles creation of data keys for client-side
  encryption, as well as manually encrypting and decrypting values.


id: MongoDB\Driver\ClientEncryption::createDataKey
type: function
doc:
<comment>Description:</comment>
  Create a new encryption data key
  
  Creates a new key document and inserts it into the key vault collection.

<comment>Param:</comment>
  <info>string</info>  <strong>$kmsProvider</strong>  The KMS provider (<return>"local"</return> or <return>"aws"</return>) that will be used to encrypt the new
                        encryption key.
  <info>array </info>  <strong>$options    </strong>  Data key optionsOptionTypeDescriptionmasterKey<info>array</info> The masterKey identifies
                        a KMS-specific key used to encrypt the new data key. If the kmsProvider is
                        <return>aws</return> it is required and has the following fields: AWS masterKey
                        optionsOptionTypeDescriptionregionstringRequired.keystringRequired. The
                        Amazon Resource Name (ARN) to the AWS customer master key
                        (CMK).endpointstringOptional. An alternate host identifier to send KMS
                        requests to. May include port number. keyAltNames<info>array</info> An optional list of
                        string alternate names used to reference a key. If a key is created with
                        alternate names, then encryption may refer to the key by the unique
                        alternate name instead of by <return>_id</return>.
                        
                        The masterKey identifies a KMS-specific key used to encrypt the new data
                        key. If the kmsProvider is <return>aws</return> it is required and has the following fields:
                        AWS masterKey
                        optionsOptionTypeDescriptionregionstringRequired.keystringRequired. The
                        Amazon Resource Name (ARN) to the AWS customer master key
                        (CMK).endpointstringOptional. An alternate host identifier to send KMS
                        requests to. May include port number.
                        
                        An optional list of string alternate names used to reference a key. If a key
                        is created with alternate names, then encryption may refer to the key by the
                        unique alternate name instead of by <return>_id</return>.

<comment>Return:</comment>
  <info>MongoDB\BSON\Binary</info>  Returns the identifier of the new key as a <class>MongoDB\BSON\Binary</class> object with
                       subtype 4 (UUID).


id: MongoDB\Driver\ClientEncryption::decrypt
type: function
doc:
<comment>Description:</comment>
  Decrypt a value
  
  Decrypts the value.

<comment>Param:</comment>
  <info>MongoDB\BSON\Binary</info>  <strong>$value</strong>  A <class>MongoDB\BSON\Binary</class> instance with subtype 6 containing the
                               encrypted value.

<comment>Return:</comment>
  <info>mixed</info>  Returns the decrypted value as it was passed to <strong>MongoDB\Driver\ClientEncryption::encrypt()</strong>.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\ClientEncryption::encrypt()</strong>


id: MongoDB\Driver\ClientEncryption::encrypt
type: function
doc:
<comment>Description:</comment>
  Encrypt a value
  
  Encrypts the value.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$value  </strong>  The value to be encrypted. Any value that can be inserted into MongoDB can be
                   encrypted using this method.
  <info>array</info>  <strong>$options</strong>  Encryption optionsOptionTypeDescriptionalgorithm<info>string</info> The encryption algorithm
                   to be used. Use the constants defined in <class>MongoDB\Driver\ClientEncryption</class>.
                   keyAltName<info>string</info> Identifies a key vault collection document by <return>keyAltName</return>.
                   keyId<class>MongoDB\BSON\Binary</class> Identifies a data key by <return>_id</return>. The value is a UUID
                   (binary subtype 4).
                   
                   The encryption algorithm to be used. Use the constants defined in
                   <class>MongoDB\Driver\ClientEncryption</class>.
                   
                   Identifies a key vault collection document by <return>keyAltName</return>.
                   
                   Identifies a data key by <return>_id</return>. The value is a UUID (binary subtype 4).
                   
                   Exactly one of <return>keyId</return> and <return>keyAltName</return> must be provided. The <return>algorithm</return> option is
                   required.

<comment>Return:</comment>
  <info>MongoDB\BSON\Binary</info>  Returns the encrypted value as <class>MongoDB\BSON\Binary</class> object with subtype 6.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\ClientEncryption::decrypt()</strong>


id: MongoDB\Driver\Command
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Command</class> class is a value object that represents a database command.
  
  To provide Command Helpers the <class>MongoDB\Driver\Command</class> object should be composed.


id: MongoDB\Driver\Command::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new Command
  
  Constructs a new <class>MongoDB\Driver\Command</class>, which is an immutable value object that represents a
  database command. The command may then be executed with MongoDB\Driver\Manager::executeCommand.
  
  The complete command document, which includes the command name and its options, should be
  expressed in the <strong>$document</strong> parameter. The <strong>$commandOptions</strong> parameter is only used to specify
  options related to the execution of the command and the resulting <class>MongoDB\Driver\Cursor</class>.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$document      </strong>  The complete command document, which will be sent to the server.
  <info>array      </info>  <strong>$commandOptions</strong>  Do not use this parameter to specify options described in the
                                command's reference in the MongoDB manual. This parameter should
                                only be used for the options explicitly listed below.
                                
                                commandOptionsOptionTypeDescriptionmaxAwaitTimeMS<info>int</info> Positive
                                integer denoting the time limit in milliseconds for the server to
                                block a getMore operation if no data is available. This option
                                should only be used in conjunction with commands that return a
                                tailable cursor (e.g. Change Streams).
                                
                                Positive integer denoting the time limit in milliseconds for the
                                server to block a getMore operation if no data is available. This
                                option should only be used in conjunction with commands that return
                                a tailable cursor (e.g. Change Streams).

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::executeCommand
   * <class>MongoDB\Driver\Cursor</class>


id: MongoDB\Driver\Cursor
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Cursor</class> class encapsulates the results of a MongoDB command or query and may be
  returned by MongoDB\Driver\Manager::executeCommand or MongoDB\Driver\Manager::executeQuery,
  respectively.


id: MongoDB\Driver\Cursor::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new Cursor (not used)
  
  <class>MongoDB\Driver\Cursor</class> objects are returned as the result of an executed command or query and
  cannot be constructed directly.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Manager::executeCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeQuery()</strong>
   * <strong>MongoDB\Driver\Server::executeCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeQuery()</strong>


id: MongoDB\Driver\Cursor::current
type: function
doc:
<comment>Description:</comment>
  Returns the current element

<comment>Return:</comment>
  <info>arrayobject</info>  Returns the current result document as an array or object, depending on the cursor's
               type map. If iteration has not started or the current position is not valid, <info>null</info>
               will be returned.

<comment>See Also:</comment>
   * Iterator::current


id: MongoDB\Driver\Cursor::getId
type: function
doc:
<comment>Description:</comment>
  Returns the ID for this cursor
  
  Returns the <class>MongoDB\Driver\CursorId</class> associated with this cursor. A cursor ID uniquely identifies
  the cursor on the server.

<comment>Return:</comment>
  <info>MongoDB\Driver\CursorId</info>  Returns the <class>MongoDB\Driver\CursorId</class> for this cursor.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\CursorId</class>
   * <strong>MongoDB\Driver\CursorId::__toString()</strong>


id: MongoDB\Driver\Cursor::getServer
type: function
doc:
<comment>Description:</comment>
  Returns the server associated with this cursor
  
  Returns the <class>MongoDB\Driver\Server</class> associated with this cursor. This is the server that executed
  the <class>MongoDB\Driver\Query</class> or <class>MongoDB\Driver\Command</class>.

<comment>Return:</comment>
  <info>MongoDB\Driver\Server</info>  Returns the <class>MongoDB\Driver\Server</class> associated with this cursor.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Server</class>


id: MongoDB\Driver\Cursor::isDead
type: function
doc:
<comment>Description:</comment>
  Checks if the cursor is exhausted or may have additional results
  
  Checks whether there are definitely no additional results available on the cursor. This method is
  similar to the cursor.isExhausted() method in the MongoDB shell and is primarily useful when
  iterating tailable cursors.
  
  A cursor has no additional results and is considered "dead" when one of the following is true:
  The current batch has been fully iterated and the cursor ID is zero (i.e. a  getMore cannot be
  issued). An error was encountered while iterating the cursor.The cursor reached its configured
  limit.
  
  By design, it is not possible to always determine whether a cursor has additional results. The
  cases where a cursor may have more data available is as follows:  There are additional documents
  in the current batch, which are buffered on the client side. Iterating will fetch a document from
  the local buffer.  There are no additional documents in the current batch (i.e. local buffer), but
  the cursor ID is non-zero. Iterating will request more documents from the server via a getMore
  operation, which may or may not return additional results and/or indicate that the cursor has been
  closed on the server by returning zero for its ID.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if there are definitely no additional results available on the cursor, and
        <info>false</info> otherwise.

<comment>See Also:</comment>
   * Tailable Cursors in the MongoDB manual
   * cursor.isExhausted() in the MongoDB manual


id: MongoDB\Driver\Cursor::key
type: function
doc:
<comment>Description:</comment>
  Returns the current result's index within the cursor

<comment>Return:</comment>
  <info>int</info>  The current result's numeric index within the cursor.

<comment>See Also:</comment>
   * Iterator::key


id: MongoDB\Driver\Cursor::next
type: function
doc:
<comment>Description:</comment>
  Advances the cursor to the next result

<comment>Return:</comment>
  <info>void</info>  Moves the current position to the next element in the cursor.

<comment>See Also:</comment>
   * Iterator::next


id: MongoDB\Driver\Cursor::rewind
type: function
doc:
<comment>Description:</comment>
  Rewind the cursor to the first result
  
  If the cursor has advanced beyond its first position, it can no longer be rewound.

<comment>Return:</comment>
  <info>void</info>  <info>null</info>.

<comment>See Also:</comment>
   * Iterator::rewind


id: MongoDB\Driver\Cursor::setTypeMap
type: function
doc:
<comment>Description:</comment>
  Sets a type map to use for BSON unserialization
  
  Sets the type map configuration to use when unserializing the BSON results into PHP values.

<comment>Param:</comment>
  <info></info>  <strong>$typeMap</strong>  configurația Type map.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * 


id: MongoDB\Driver\Cursor::toArray
type: function
doc:
<comment>Description:</comment>
  Returns an array containing all results for this cursor
  
  Iterates the cursor and returns its results in an array. <strong>MongoDB\Driver\Cursor::setTypeMap()</strong> may
  be used to control how documents are unserialized into PHP values.

<comment>Return:</comment>
  <info>array</info>  Returns an <info>array</info> containing all results for this cursor.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Cursor::setTypeMap()</strong>


id: MongoDB\Driver\Cursor::valid
type: function
doc:
<comment>Description:</comment>
  Checks if the current position in the cursor is valid

<comment>Return:</comment>
  <info>bool</info>  <info>true</info> if the current cursor position is valid, <info>false</info> otherwise.

<comment>See Also:</comment>
   * Iterator::valid


id: MongoDB\Driver\CursorId
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\CursorID</class> class is a value object that represents a cursor ID. Instances of this
  class are returned by <strong>MongoDB\Driver\Cursor::getId()</strong>.


id: MongoDB\Driver\CursorId::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new CursorId (not used)
  
  <class>MongoDB\Driver\CursorId</class> objects are returned from <strong>MongoDB\Driver\Cursor::getId()</strong> and cannot be
  constructed directly.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Cursor::getId()</strong>


id: MongoDB\Driver\CursorId::__toString
type: function
doc:
<comment>Description:</comment>
  String representation of the cursor ID
  
  Returns the <info>string</info> representation of the cursor ID.

<comment>Return:</comment>
  <info>string</info>  Returns the <info>string</info> representation of the cursor ID.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Cursor::getId()</strong>


id: MongoDB\Driver\CursorId::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a CursorId

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\Driver\CursorId</class>.

<comment>See Also:</comment>
   * MongoDB\Driver\CursorId::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\Driver\CursorId::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a CursorId

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\Driver\CursorId</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\Driver\CursorId</class>.

<comment>See Also:</comment>
   * MongoDB\Driver\CursorId::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\Driver\CursorInterface
type: class
doc:
<comment>Description:</comment>
  This interface is implemented by <class>MongoDB\Driver\Cursor</class> but may also be used for type-hinting and
  userland classes.


id: MongoDB\Driver\CursorInterface::getId
type: function
doc:
<comment>Description:</comment>
  Returns the ID for this cursor
  
  Returns the <class>MongoDB\Driver\CursorId</class> associated with this cursor. A cursor ID uniquely identifies
  the cursor on the server.

<comment>Return:</comment>
  <info>MongoDB\Driver\CursorId</info>  Returns the <class>MongoDB\Driver\CursorId</class> for this cursor.

<comment>See Also:</comment>
   * MongoDB\Driver\Cursor::getId
   * <class>MongoDB\Driver\CursorId</class>
   * <strong>MongoDB\Driver\CursorId::__toString()</strong>


id: MongoDB\Driver\CursorInterface::getServer
type: function
doc:
<comment>Description:</comment>
  Returns the server associated with this cursor
  
  Returns the <class>MongoDB\Driver\Server</class> associated with this cursor. This is the server that executed
  the <class>MongoDB\Driver\Query</class> or <class>MongoDB\Driver\Command</class>.

<comment>Return:</comment>
  <info>MongoDB\Driver\Server</info>  Returns the <class>MongoDB\Driver\Server</class> associated with this cursor.

<comment>See Also:</comment>
   * MongoDB\Driver\Cursor::getServer
   * <class>MongoDB\Driver\Server</class>


id: MongoDB\Driver\CursorInterface::isDead
type: function
doc:
<comment>Description:</comment>
  Checks if the cursor may have additional results
  
  Checks whether the cursor may have additional results available to read. A cursor is initially
  "alive" but may become "dead" for any of the following reasons: Advancing a non-tailable cursor
  did not return a documentThe cursor encountered an errorThe cursor read its last batch to
  completionThe cursor reached its configured limit This is primarily useful with tailable cursors.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if additional results are not available, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * MongoDB\Driver\Cursor::isDead


id: MongoDB\Driver\CursorInterface::setTypeMap
type: function
doc:
<comment>Description:</comment>
  Sets a type map to use for BSON unserialization
  
  Sets the type map configuration to use when unserializing the BSON results into PHP values.

<comment>Param:</comment>
  <info></info>  <strong>$typeMap</strong>  configurația Type map.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Cursor::setTypeMap
   * 


id: MongoDB\Driver\CursorInterface::toArray
type: function
doc:
<comment>Description:</comment>
  Returns an array containing all results for this cursor
  
  Iterates the cursor and returns its results in an array.
  <strong>MongoDB\Driver\CursorInterface::setTypeMap()</strong> may be used to control how documents are unserialized
  into PHP values.

<comment>Return:</comment>
  <info>array</info>  Returns an <info>array</info> containing all results for this cursor.

<comment>See Also:</comment>
   * MongoDB\Driver\Cursor::toArray
   * <strong>MongoDB\Driver\CursorInterface::setTypeMap()</strong>


id: MongoDB\Driver\Exception\CommandException::getResultDocument
type: function
doc:
<comment>Description:</comment>
  Returns the result document for the failed command
  
  Returns the result document for the failed command.

<comment>Return:</comment>
  <info>object</info>  The result document for the failed command.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Manager::executeCommand()</strong>


id: MongoDB\Driver\Exception\ConnectionException
type: class
doc:
<comment>Description:</comment>
  Base class for exceptions thrown when the driver fails to establish a database connection.


id: MongoDB\Driver\Exception\ConnectionTimeoutException
type: class
doc:
<comment>Description:</comment>
  Thrown when the driver fails to establish a database connection within a specified time limit
  (connectTimeoutMS) or server selection fails (serverSelectionTimeoutMS).


id: MongoDB\Driver\Exception\Exception
type: class
doc:
<comment>Description:</comment>
  Common interface for all driver exceptions. This may be used to catch only exceptions originating
  from the driver itself.


id: MongoDB\Driver\Exception\ExecutionTimeoutException
type: class
doc:
<comment>Description:</comment>
  Thrown when a query or command fails to complete within a specified time limit (e.g. maxTimeMS).


id: MongoDB\Driver\Exception\InvalidArgumentException
type: class
doc:
<comment>Description:</comment>
  Thrown when a driver method is given invalid arguments (e.g. invalid option types).


id: MongoDB\Driver\Exception\LogicException
type: class
doc:
<comment>Description:</comment>
  Thrown when the driver is incorrectly used (e.g. rewinding a cursor).


id: MongoDB\Driver\Exception\RuntimeException
type: class
doc:
<comment>Description:</comment>
  Thrown when the driver encounters a runtime error (e.g. internal error from libmongoc).


id: MongoDB\Driver\Exception\RuntimeException::hasErrorLabel
type: function
doc:
<comment>Description:</comment>
  Returns whether an error label is associated with an exception
  
  Returns whether the <strong>$errorLabel</strong> has been set for this exception. Error labels are set by either
  the server or the driver to indicated specific situations on which you might want to decide on how
  you want to handle a specific exception. A common situation might be to find out whether you can
  safely retry a transaction that failed due to a transient error (like a networking issue, or a
  transaction conflict). Examples of error labels are <return>TransientTransactionError</return> and
  <return>UnknownTransactionCommitResult</return>.

<comment>Param:</comment>
  <info>string</info>  <strong>$errorLabel</strong>  The name of the <return>errorLabel</return> to test for.

<comment>Return:</comment>
  <info>bool</info>  Whether the given <return>errorLabel</return> is associated with this exception.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Session::commitTransaction()</strong>
   * MongoDB documentation on transactions


id: MongoDB\Driver\Exception\SSLConnectionException
type: class
doc:
<comment>Description:</comment>
  Thrown when the driver fails to establish an SSL connection with the server.


id: MongoDB\Driver\Exception\ServerException
type: class
doc:
<comment>Description:</comment>
  Base class for exceptions thrown by the server. The code of this exception and its subclasses will
  correspond to the original error code from the server.


id: MongoDB\Driver\Exception\UnexpectedValueException
type: class
doc:
<comment>Description:</comment>
  Thrown when the driver encounters an unexpected value (e.g. during BSON serialization or
  deserialization).


id: MongoDB\Driver\Exception\WriteException
type: class
doc:
<comment>Description:</comment>
  Base class for exceptions thrown by a failed write operation. The exception encapsulates a
  <class>MongoDB\Driver\WriteResult</class> object.


id: MongoDB\Driver\Exception\WriteException::getWriteResult
type: function
doc:
<comment>Description:</comment>
  Returns the WriteResult for the failed write operation
  
  Returns the <class>MongoDB\Driver\WriteResult</class> for the failed write operation. The
  <strong>MongoDB\Driver\WriteResult::getWriteErrors()</strong> and
  <strong>MongoDB\Driver\WriteResult::getWriteConcernError()</strong> methods may be used to get more details about
  the failure.

<comment>Return:</comment>
  <info>MongoDB\Driver\WriteResult</info>  The <class>MongoDB\Driver\WriteResult</class> for the failed write operation.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\WriteResult</class>
   * <strong>MongoDB\Driver\Manager::executeBulkWrite()</strong>


id: MongoDB\Driver\Manager
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Manager</class> is the main entry point to the extension. It is responsible for
  maintaining connections to MongoDB (be it standalone server, replica set, or sharded cluster).
  
  No connection to MongoDB is made upon instantiating the Manager. This means the
  <class>MongoDB\Driver\Manager</class> can always be constructed, even though one or more MongoDB servers are
  down.
  
  Any write or query can throw connection exceptions as connections are created lazily. A MongoDB
  server may also become unavailable during the life time of the script. It is therefore important
  that all actions on the Manager to be wrapped in try/catch statements.


id: MongoDB\Driver\Manager::__construct
type: function
doc:
<comment>Description:</comment>
  Create new MongoDB Manager
  
  Constructs a new <class>MongoDB\Driver\Manager</class> object with the specified options.
  
  Per the Server Discovery and Monitoring Specification, this constructor performs no I/O.
  Connections will be initialized on demand, when the first operation is executed.
  
  When specifying any SSL or TLS URI options via the connection string or <strong>$uriOptions</strong> parameter, the
  driver will implicitly enable TLS for its connections. To avoid this, either explicitly disable
  the <return>tls</return> option or don't specify any TLS options.
  
  Pe platforme Unix driver-ul MongoDB este senzitiv la scripturi care utilizează apelul de sistem
  fork() fără a apela și exec(). Utilizatorii sunt sfătuiți să nu reutilizeze instanțe
  <class>MongoDB\Driver\Manager</class> într-un proces-fiu creat cu fork.

<comment>Param:</comment>
  <info>string</info>  <strong>$uri          </strong>  A mongodb:// connection URI: 
                          
                          For details on supported URI options, see Connection String Options in the
                          MongoDB manual. Connection pool options are not supported, as the PHP
                          driver does not implement connection pools.
                          
                          The <strong>$uri</strong> is a URL, hence any special characters in its components need to
                          be URL encoded according to RFC 3986. This is particularly relevant to the
                          username and password, which can often include special characters such as
                          <return>@</return>, <return>:</return>, or <return>%</return>. When connecting via a Unix domain socket, the socket path may
                          contain special characters such as slashes and must be encoded. The
                          <strong>rawurlencode()</strong> function may be used to encode constituent parts of the
                          URI.
                          
                          The <return>defaultAuthDb</return> component may be used to specify the database name
                          associated with the user's credentials; however the <return>authSource</return> URI option
                          will take priority if specified. If neither <return>defaultAuthDb</return> nor <return>authSource</return>
                          are specified, the <return>admin</return> database will be used by default. The
                          <return>defaultAuthDb</return> component has no effect in the absence of user credentials.
  <info>array </info>  <strong>$uriOptions   </strong>  Additional connection string options, which will overwrite any options
                          with the same name in the <strong>$uri</strong> parameter.
                          
                          uriOptionsOptionTypeDescriptionappname<info>string</info> MongoDB 3.4+ has the ability
                          to annotate connections with metadata provided by the connecting client.
                          This metadata is included in the server's logs upon establishing a
                          connection and also recorded in slow query logs when database profiling is
                          enabled.  This option may be used to specify an application name, which
                          will be included in the metadata. The value cannot exceed 128 characters
                          in length. authMechanism<info>string</info> The authentication mechanism that MongoDB
                          will use to authenticate the connection. For additional details and a list
                          of supported values, see Authentication Options in the MongoDB manual.
                          authMechanismProperties<info>array</info> Properties for the selected authentication
                          mechanism. For additional details and a list of supported properties, see
                          the Driver Authentication Specification.  When not specified in the URI
                          string, this option is expressed as an array of key/value pairs. The keys
                          and values in this array should be strings. authSource<info>string</info> The database
                          name associated with the user's credentials. Defaults to the database
                          component of the connection URI, or the <return>admin</return> database if both are
                          unspecified.  For authentication mechanisms that delegate credential
                          storage to other services (e.g. GSSAPI), this should be <return>"$external"</return>.
                          canonicalizeHostname<info>bool</info> If <info>true</info>, the driver will resolve the real
                          hostname for the server IP address before authenticating via SASL. Some
                          underlying GSSAPI layers already do this, but the functionality may be
                          disabled in their config (e.g. <return>krb.conf</return>). Defaults to <info>false</info>.  This option
                          is a deprecated alias for the <return>"CANONICALIZE_HOST_NAME"</return> property of the
                          <return>"authMechanismProperties"</return> URI option. compressors<info>string</info> A prioritized,
                          comma-delimited list of compressors that the client wants to use. Messages
                          are only compressed if the client and server share any compressors in
                          common, and the compressor used in each direction will depend on the
                          individual configuration of the server or driver. See the Driver
                          Compression Specification for more information. connectTimeoutMS<info>int</info> The
                          time in milliseconds to attempt a connection before timing out. Defaults
                          to 10,000 milliseconds. directConnection<info>bool</info> This option can be used to
                          control replica set discovery behavior when only a single host is provided
                          in the connection string. By default, providing a single member in the
                          connection string will establish a direct connection or discover
                          additional members depending on whether the <return>"replicaSet"</return> URI option is
                          omitted or present, respectively. Specify <info>false</info> to force discovery to
                          occur (if <return>"replicaSet"</return> is omitted) or specify <info>true</info> to force a direct
                          connection (if <return>"replicaSet"</return> is present). gssapiServiceName<info>string</info> Set the
                          Kerberos service name when connecting to Kerberized MongoDB instances.
                          This value must match the service name set on MongoDB instances (i.e.
                          saslServiceName server parameter). Defaults to <return>"mongodb"</return>.  This option is
                          a deprecated alias for the <return>"SERVICE_NAME"</return> property of the
                          <return>"authMechanismProperties"</return> URI option. heartbeatFrequencyMS<info>int</info> Specifies
                          the interval in milliseconds between the driver's checks of the MongoDB
                          topology, counted from the end of the previous check until the beginning
                          of the next one. Defaults to 60,000 milliseconds.  Per the Server
                          Discovery and Monitoring Specification, this value cannot be less than 500
                          milliseconds. journal<info>bool</info> Corresponds to the default write concern's
                          <strong>$journal</strong> parameter. If <info>true</info>, writes will require acknowledgement from
                          MongoDB that the operation has been written to the journal. For details,
                          see <class>MongoDB\Driver\WriteConcern</class>. localThresholdMS<info>int</info> The size in
                          milliseconds of the latency window for selecting among multiple suitable
                          MongoDB instances while resolving a read preference. Defaults to 15
                          milliseconds. maxStalenessSeconds<info>int</info> Corresponds to the read preference's
                          <return>"maxStalenessSeconds"</return>. Specifies, in seconds, how stale a secondary can be
                          before the client stops using it for read operations. By default, there is
                          no maximum staleness and clients will not consider a secondary’s lag when
                          choosing where to direct a read operation. For details, see
                          <class>MongoDB\Driver\ReadPreference</class>.  If specified, the max staleness must be a
                          signed 32-bit integer greater than or equal to
                          <info>MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS</info> (i.e. 90
                          seconds). password<info>string</info> The password for the user being authenticated.
                          This option is useful if the password contains special characters, which
                          would otherwise need to be URL encoded for the connection URI.
                          readConcernLevel<info>string</info> Corresponds to the read concern's <strong>$level</strong> parameter.
                          Specifies the level of read isolation. For details, see
                          <class>MongoDB\Driver\ReadConcern</class>. readPreference<info>string</info> Corresponds to the read
                          preference's <strong>$mode</strong> parameter. Defaults to <return>"primary"</return>. For details, see
                          <class>MongoDB\Driver\ReadPreference</class>. readPreferenceTags<info>array</info> Corresponds to the
                          read preference's <strong>$tagSets</strong> parameter. Tag sets allow you to target read
                          operations to specific members of a replica set. For details, see
                          <class>MongoDB\Driver\ReadPreference</class>.  When not specified in the URI string, this
                          option is expressed as an array consistent with the format expected by
                          <strong>MongoDB\Driver\ReadPreference::__construct()</strong>. replicaSet<info>string</info> Specifies
                          the name of the replica set. retryReads<info>bool</info> Specifies whether or not the
                          driver should automatically retry certain read operations that fail due to
                          transient network errors or replica set elections. This functionality
                          requires MongoDB 3.6+. Defaults to <info>true</info>.  See the Retryable Reads
                          Specification for more information. retryWrites<info>bool</info> Specifies whether or
                          not the driver should automatically retry certain write operations that
                          fail due to transient network errors or replica set elections. This
                          functionality requires MongoDB 3.6+. Defaults to <info>true</info>.  See Retryable
                          Writes in the MongoDB manual for more information. safe<info>bool</info> If <info>true</info>,
                          specifies <return>1</return> for the default write concern's <strong>$w</strong> parameter. If <info>false</info>, <return>0</return> is
                          specified. For details, see <class>MongoDB\Driver\WriteConcern</class>.  This option is
                          deprecated and should not be used. serverSelectionTimeoutMS<info>int</info> Specifies
                          how long in milliseconds to block for server selection before throwing an
                          exception. Defaults to 30,000 milliseconds. serverSelectionTryOnce<info>bool</info>
                          When <info>true</info>, instructs the driver to scan the MongoDB deployment exactly
                          once after server selection fails and then either select a server or raise
                          an error. When <info>false</info>, the driver blocks and searches for a server up to
                          the <return>"serverSelectionTimeoutMS"</return> value. Defaults to <info>true</info>. slaveOk<info>bool</info>
                          Specifies <return>"secondaryPreferred"</return> for the read preference mode if <info>true</info>. For
                          details, see <class>MongoDB\Driver\ReadPreference</class>.  This option is deprecated and
                          should not be used. socketCheckIntervalMS<info>int</info> If a socket has not been used
                          recently, the driver must check it via an <return>isMaster</return> command before using it
                          for any operation. Defaults to 5,000 milliseconds. socketTimeoutMS<info>int</info> The
                          time in milliseconds to attempt a send or receive on a socket before
                          timing out. Defaults to 300,000 milliseconds (i.e. five minutes). ssl<info>bool</info>
                          Initiates the connection with TLS/SSL if <info>true</info>. Defaults to <info>false</info>.  This
                          option is a deprecated alias for the <return>"tls"</return> URI option. tls<info>bool</info> Initiates
                          the connection with TLS/SSL if <info>true</info>. Defaults to <info>false</info>.
                          tlsAllowInvalidCertificates<info>bool</info> Specifies whether or not the driver should
                          error when the server's TLS certificate is invalid. Defaults to <info>false</info>.
                          Disabling certificate validation creates a vulnerability.
                          tlsAllowInvalidHostnames<info>bool</info> Specifies whether or not the driver should
                          error when there is a mismatch between the server's hostname and the
                          hostname specified by the TLS certificate. Defaults to <info>false</info>.  Disabling
                          certificate validation creates a vulnerability. Allowing invalid hostnames
                          may expose the driver to a man-in-the-middle attack. tlsCAFile<info>string</info> Path
                          to file with either a single or bundle of certificate authorities to be
                          considered trusted when making a TLS connection. The system certificate
                          store will be used by default. tlsCertificateKeyFile<info>string</info> Path to the
                          client certificate file or the client private key file; in the case that
                          they both are needed, the files should be concatenated.
                          tlsCertificateKeyFilePassword<info>string</info> Password to decrypt the client private
                          key (i.e. <return>"tlsCertificateKeyFile"</return> URI option) to be used for TLS
                          connections. tlsDisableCertificateRevocationCheck<info>bool</info> If <info>true</info>, the driver
                          will not attempt to check certificate revocation status (e.g. OCSP, CRL).
                          Defaults to <info>false</info>. tlsDisableOCSPEndpointCheck<info>bool</info> If <info>true</info>, the driver
                          will not attempt to contact an OCSP responder endpoint if needed (i.e. an
                          OCSP response is not stapled). Defaults to <info>false</info>. tlsInsecure<info>bool</info> Relax
                          TLS constraints as much as possible. Specifying <info>true</info> for this option has
                          the same effect as specifying <info>true</info> for both the
                          <return>"tlsAllowInvalidCertificates"</return> and <return>"tlsAllowInvalidHostnames"</return> URI options.
                          Defaults to <info>false</info>.  Disabling certificate validation creates a
                          vulnerability. Allowing invalid hostnames may expose the driver to a
                          man-in-the-middle attack. username<info>string</info> The username for the user being
                          authenticated. This option is useful if the username contains special
                          characters, which would otherwise need to be URL encoded for the
                          connection URI. w<info>int</info><info>string</info></info> Corresponds to the default write concern's <strong>$w</strong>
                          parameter. For details, see <class>MongoDB\Driver\WriteConcern</class>.
                          wTimeoutMS<info>int</info><info>string</info></info> Corresponds to the default write concern's <strong>$wtimeout</strong>
                          parameter. Specifies a time limit, in milliseconds, for the write concern.
                          For details, see <class>MongoDB\Driver\WriteConcern</class>.  If specified, <return>wTimeoutMS</return>
                          must be a signed 32-bit integer greater than or equal to zero.
                          zlibCompressionLevel<info>int</info> Specifies the compression level to use for the
                          zlib compressor. This option has no effect if <return>zlib</return> is not included in the
                          <return>"compressors"</return> URI option. See the Driver Compression Specification for
                          more information.
                          
                          MongoDB 3.4+ has the ability to annotate connections with metadata
                          provided by the connecting client. This metadata is included in the
                          server's logs upon establishing a connection and also recorded in slow
                          query logs when database profiling is enabled.
                          
                          This option may be used to specify an application name, which will be
                          included in the metadata. The value cannot exceed 128 characters in
                          length.
                          
                          The authentication mechanism that MongoDB will use to authenticate the
                          connection. For additional details and a list of supported values, see
                          Authentication Options in the MongoDB manual.
                          
                          Properties for the selected authentication mechanism. For additional
                          details and a list of supported properties, see the Driver Authentication
                          Specification.
                          
                          When not specified in the URI string, this option is expressed as an array
                          of key/value pairs. The keys and values in this array should be strings.
                          
                          The database name associated with the user's credentials. Defaults to the
                          database component of the connection URI, or the <return>admin</return> database if both
                          are unspecified.
                          
                          For authentication mechanisms that delegate credential storage to other
                          services (e.g. GSSAPI), this should be <return>"$external"</return>.
                          
                          If <info>true</info>, the driver will resolve the real hostname for the server IP
                          address before authenticating via SASL. Some underlying GSSAPI layers
                          already do this, but the functionality may be disabled in their config
                          (e.g. <return>krb.conf</return>). Defaults to <info>false</info>.
                          
                          This option is a deprecated alias for the <return>"CANONICALIZE_HOST_NAME"</return>
                          property of the <return>"authMechanismProperties"</return> URI option.
                          
                          A prioritized, comma-delimited list of compressors that the client wants
                          to use. Messages are only compressed if the client and server share any
                          compressors in common, and the compressor used in each direction will
                          depend on the individual configuration of the server or driver. See the
                          Driver Compression Specification for more information.
                          
                          The time in milliseconds to attempt a connection before timing out.
                          Defaults to 10,000 milliseconds.
                          
                          This option can be used to control replica set discovery behavior when
                          only a single host is provided in the connection string. By default,
                          providing a single member in the connection string will establish a direct
                          connection or discover additional members depending on whether the
                          <return>"replicaSet"</return> URI option is omitted or present, respectively. Specify <info>false</info>
                          to force discovery to occur (if <return>"replicaSet"</return> is omitted) or specify <info>true</info>
                          to force a direct connection (if <return>"replicaSet"</return> is present).
                          
                          Set the Kerberos service name when connecting to Kerberized MongoDB
                          instances. This value must match the service name set on MongoDB instances
                          (i.e. saslServiceName server parameter). Defaults to <return>"mongodb"</return>.
                          
                          This option is a deprecated alias for the <return>"SERVICE_NAME"</return> property of the
                          <return>"authMechanismProperties"</return> URI option.
                          
                          Specifies the interval in milliseconds between the driver's checks of the
                          MongoDB topology, counted from the end of the previous check until the
                          beginning of the next one. Defaults to 60,000 milliseconds.
                          
                          Per the Server Discovery and Monitoring Specification, this value cannot
                          be less than 500 milliseconds.
                          
                          Corresponds to the default write concern's <strong>$journal</strong> parameter. If <info>true</info>,
                          writes will require acknowledgement from MongoDB that the operation has
                          been written to the journal. For details, see <class>MongoDB\Driver\WriteConcern</class>.
                          
                          The size in milliseconds of the latency window for selecting among
                          multiple suitable MongoDB instances while resolving a read preference.
                          Defaults to 15 milliseconds.
                          
                          Corresponds to the read preference's <return>"maxStalenessSeconds"</return>. Specifies, in
                          seconds, how stale a secondary can be before the client stops using it for
                          read operations. By default, there is no maximum staleness and clients
                          will not consider a secondary’s lag when choosing where to direct a read
                          operation. For details, see <class>MongoDB\Driver\ReadPreference</class>.
                          
                          If specified, the max staleness must be a signed 32-bit integer greater
                          than or equal to
                          <info>MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS</info> (i.e. 90
                          seconds).
                          
                          Corresponds to the read preference's <strong>$mode</strong> parameter. Defaults to
                          <return>"primary"</return>. For details, see <class>MongoDB\Driver\ReadPreference</class>.
                          
                          Corresponds to the read preference's <strong>$tagSets</strong> parameter. Tag sets allow
                          you to target read operations to specific members of a replica set. For
                          details, see <class>MongoDB\Driver\ReadPreference</class>.
                          
                          When not specified in the URI string, this option is expressed as an array
                          consistent with the format expected by
                          <strong>MongoDB\Driver\ReadPreference::__construct()</strong>.
                          
                          Specifies the name of the replica set.
                          
                          Specifies whether or not the driver should automatically retry certain
                          read operations that fail due to transient network errors or replica set
                          elections. This functionality requires MongoDB 3.6+. Defaults to <info>true</info>.
                          
                          See the Retryable Reads Specification for more information.
                          
                          Specifies whether or not the driver should automatically retry certain
                          write operations that fail due to transient network errors or replica set
                          elections. This functionality requires MongoDB 3.6+. Defaults to <info>true</info>.
                          
                          See Retryable Writes in the MongoDB manual for more information.
                          
                          If <info>true</info>, specifies <return>1</return> for the default write concern's <strong>$w</strong> parameter. If
                          <info>false</info>, <return>0</return> is specified. For details, see <class>MongoDB\Driver\WriteConcern</class>.
                          
                          This option is deprecated and should not be used.
                          
                          Specifies how long in milliseconds to block for server selection before
                          throwing an exception. Defaults to 30,000 milliseconds.
                          
                          When <info>true</info>, instructs the driver to scan the MongoDB deployment exactly
                          once after server selection fails and then either select a server or raise
                          an error. When <info>false</info>, the driver blocks and searches for a server up to
                          the <return>"serverSelectionTimeoutMS"</return> value. Defaults to <info>true</info>.
                          
                          Specifies <return>"secondaryPreferred"</return> for the read preference mode if <info>true</info>. For
                          details, see <class>MongoDB\Driver\ReadPreference</class>.
                          
                          This option is deprecated and should not be used.
                          
                          If a socket has not been used recently, the driver must check it via an
                          <return>isMaster</return> command before using it for any operation. Defaults to 5,000
                          milliseconds.
                          
                          The time in milliseconds to attempt a send or receive on a socket before
                          timing out. Defaults to 300,000 milliseconds (i.e. five minutes).
                          
                          Initiates the connection with TLS/SSL if <info>true</info>. Defaults to <info>false</info>.
                          
                          This option is a deprecated alias for the <return>"tls"</return> URI option.
                          
                          Initiates the connection with TLS/SSL if <info>true</info>. Defaults to <info>false</info>.
                          
                          Specifies whether or not the driver should error when the server's TLS
                          certificate is invalid. Defaults to <info>false</info>.
                          
                          Disabling certificate validation creates a vulnerability.
                          
                          Specifies whether or not the driver should error when there is a mismatch
                          between the server's hostname and the hostname specified by the TLS
                          certificate. Defaults to <info>false</info>.
                          
                          Disabling certificate validation creates a vulnerability. Allowing invalid
                          hostnames may expose the driver to a man-in-the-middle attack.
                          
                          Path to file with either a single or bundle of certificate authorities to
                          be considered trusted when making a TLS connection. The system certificate
                          store will be used by default.
                          
                          Path to the client certificate file or the client private key file; in the
                          case that they both are needed, the files should be concatenated.
                          
                          Password to decrypt the client private key (i.e. <return>"tlsCertificateKeyFile"</return>
                          URI option) to be used for TLS connections.
                          
                          If <info>true</info>, the driver will not attempt to check certificate revocation
                          status (e.g. OCSP, CRL). Defaults to <info>false</info>.
                          
                          If <info>true</info>, the driver will not attempt to contact an OCSP responder endpoint
                          if needed (i.e. an OCSP response is not stapled). Defaults to <info>false</info>.
                          
                          Relax TLS constraints as much as possible. Specifying <info>true</info> for this option
                          has the same effect as specifying <info>true</info> for both the
                          <return>"tlsAllowInvalidCertificates"</return> and <return>"tlsAllowInvalidHostnames"</return> URI options.
                          Defaults to <info>false</info>.
                          
                          Disabling certificate validation creates a vulnerability. Allowing invalid
                          hostnames may expose the driver to a man-in-the-middle attack.
                          
                          Corresponds to the default write concern's <strong>$w</strong> parameter. For details, see
                          <class>MongoDB\Driver\WriteConcern</class>.
                          
                          Corresponds to the default write concern's <strong>$wtimeout</strong> parameter. Specifies
                          a time limit, in milliseconds, for the write concern. For details, see
                          <class>MongoDB\Driver\WriteConcern</class>.
                          
                          If specified, <return>wTimeoutMS</return> must be a signed 32-bit integer greater than or
                          equal to zero.
                          
                          Specifies the compression level to use for the zlib compressor. This
                          option has no effect if <return>zlib</return> is not included in the <return>"compressors"</return> URI
                          option. See the Driver Compression Specification for more information.
  <info>array </info>  <strong>$driverOptions</strong>  driverOptionsOptionTypeDescriptionallow_invalid_hostname<info>bool</info> Disables
                          hostname validation if <info>true</info>. Defaults to <info>false</info>.  Allowing invalid
                          hostnames may expose the driver to a man-in-the-middle attack.  This
                          option is a deprecated alias for the <return>"tlsAllowInvalidHostnames"</return> URI
                          option. autoEncryption<info>array</info> Provides options to enable automatic
                          client-side field level encryption. The following options are supported:
                           Options for automatic
                          encryptionOptionTypeDescriptionkeyVaultClient<class>MongoDB\Driver\Manager</class>Managerul
                          utilizat pentru a ruta interpelările cheilor de date către un cluster
                          separat MongoDB. Sunt utilizate implicit Managerul și cluster-ul
                          curent.keyVaultNamespace<info>string</info>Un spațiu de nume deplin calificat (de ex.
                          <return>"databaseName.collectionName"</return>) ce denotă colecția ce conține toate cheile
                          de date utilizate pentru criptare și decriptare.kmsProviders<info>array</info> Un
                          document ce conține configurația pentru unul sau mai mulți furnizori KMS,
                          ce vor fi utilizați pentru criptarea cheilor de date. În prezent sunt
                          susținute <return>aws</return> și <return>local</return> și cel puțin unul dintre ei trebuie specificat.
                          Formatul pentru <return>aws</return> este după cum urmează: , secretAccessKey:
                          }
                          ]]> Formatul pentru <return>local</return> este după cum urmează: 
                          }
                          ]]>schemaMap<info>array</info> Allows specifying a local JSON schema that is used to
                          configure encryption.  Supplying a <return>schemaMap</return> provides more security than
                          relying on JSON schemas obtained from the server. It protects against a
                          malicious server advertising a false JSON schema, which could trick the
                          client into sending unencrypted data that should be encrypted.  Schemas
                          supplied in the <return>schemaMap</return> only apply to configuring automatic encryption
                          for client side encryption. Other validation rules in the JSON schema will
                          not be enforced by the driver and will result in an error.
                          bypassAutoEncryption<info>bool</info> With this option set to <info>true</info>, <return>mongocryptd</return> will
                          not be spawned automatically. This is used to disable automatic
                          encryption. extraOptions<info>array</info> The <return>extraOptions</return> relate to the <return>mongocryptd</return>
                          process. See the Client-Side Encryption Specification for more
                          information.   Automatic encryption is an enterprise only feature that
                          only applies to operations on a collection. Automatic encryption is not
                          supported for operations on a database or view, and operations that are
                          not bypassed will result in error. To bypass automatic encryption for all
                          operations, set <return>bypassAutoEncryption=true</return> in <return>autoEncryption</return>. For more
                          information on whitelisted operations, see the Client-Side Encryption
                          Specification. ca_dir<info>string</info> Path to a correctly hashed certificate
                          directory. The system certificate store will be used by default.
                          ca_file<info>string</info> Path to file with either a single or bundle of certificate
                          authorities to be considered trusted when making a TLS connection. The
                          system certificate store will be used by default.  This option is a
                          deprecated alias for the <return>"tlsCAFile"</return> URI option. context<info>resource</info>SSL
                          context options to be used as fallbacks if a driver option or its
                          equivalent URI option, if any, is not specified. Note that the driver does
                          not consult the default stream context (i.e.
                          <strong>stream_context_get_default()</strong>). The following context options are
                          supported: SSL context option fallbacksDriver optionContext option
                          (fallback)ca_dircapathca_filecafilepem_filelocal_certpem_pwdpassphraseweak_cert_validationallow_self_signed
                          This option is supported for backwards compatibility, but should be
                          considered deprecated. crl_file<info>string</info>Path to a certificate revocation list
                          file.driver<info>array</info> Allows custom drivers to append their own metadata to the
                          server handshake. By default, the driver submits its own name, version,
                          and platform (i.e. PHP version) in the handshake. Custom drivers can
                          specify strings for the <return>"name"</return>, <return>"version"</return>, and <return>"platform"</return> keys of this
                          array, which will be appended to the respective field(s) in the handshake
                          document.  Handshake information is limited to 512 bytes. The driver will
                          truncate handshake data to fit within this 512-byte string. Drivers and
                          ODMs are encouraged to keep their own metadata concise. pem_file<info>string</info>
                          Path to a PEM encoded certificate to use for client authentication.  This
                          option is a deprecated alias for the <return>"tlsCertificateKeyFile"</return> URI option.
                          pem_pwd<info>string</info> Passphrase for the PEM encoded certificate (if applicable).
                          This option is a deprecated alias for the <return>"tlsCertificateKeyFilePassword"</return>
                          URI option. weak_cert_validation<info>bool</info> Disables certificate validation if
                          <info>true</info>. Defaults to <info>false</info>  This option is a deprecated alias for the
                          <return>"tlsAllowInvalidHostnames"</return> URI option.
                          
                          Disables hostname validation if <info>true</info>. Defaults to <info>false</info>.
                          
                          Allowing invalid hostnames may expose the driver to a man-in-the-middle
                          attack.
                          
                          This option is a deprecated alias for the <return>"tlsAllowInvalidHostnames"</return> URI
                          option.
                          
                          Provides options to enable automatic client-side field level encryption.
                          The following options are supported:
                           Options for automatic
                          encryptionOptionTypeDescriptionkeyVaultClient<class>MongoDB\Driver\Manager</class>Managerul
                          utilizat pentru a ruta interpelările cheilor de date către un cluster
                          separat MongoDB. Sunt utilizate implicit Managerul și cluster-ul
                          curent.keyVaultNamespace<info>string</info>Un spațiu de nume deplin calificat (de ex.
                          <return>"databaseName.collectionName"</return>) ce denotă colecția ce conține toate cheile
                          de date utilizate pentru criptare și decriptare.kmsProviders<info>array</info> Un
                          document ce conține configurația pentru unul sau mai mulți furnizori KMS,
                          ce vor fi utilizați pentru criptarea cheilor de date. În prezent sunt
                          susținute <return>aws</return> și <return>local</return> și cel puțin unul dintre ei trebuie specificat.
                          Formatul pentru <return>aws</return> este după cum urmează: , secretAccessKey:
                          }
                          ]]> Formatul pentru <return>local</return> este după cum urmează: 
                          }
                          ]]>schemaMap<info>array</info> Allows specifying a local JSON schema that is used to
                          configure encryption.  Supplying a <return>schemaMap</return> provides more security than
                          relying on JSON schemas obtained from the server. It protects against a
                          malicious server advertising a false JSON schema, which could trick the
                          client into sending unencrypted data that should be encrypted.  Schemas
                          supplied in the <return>schemaMap</return> only apply to configuring automatic encryption
                          for client side encryption. Other validation rules in the JSON schema will
                          not be enforced by the driver and will result in an error.
                          bypassAutoEncryption<info>bool</info> With this option set to <info>true</info>, <return>mongocryptd</return> will
                          not be spawned automatically. This is used to disable automatic
                          encryption. extraOptions<info>array</info> The <return>extraOptions</return> relate to the <return>mongocryptd</return>
                          process. See the Client-Side Encryption Specification for more
                          information.
                          
                          Un document ce conține configurația pentru unul sau mai mulți furnizori
                          KMS, ce vor fi utilizați pentru criptarea cheilor de date. În prezent sunt
                          susținute <return>aws</return> și <return>local</return> și cel puțin unul dintre ei trebuie specificat.
                          
                          Formatul pentru <return>aws</return> este după cum urmează:
                          
                          Formatul pentru <return>local</return> este după cum urmează:
                          
                          Allows specifying a local JSON schema that is used to configure
                          encryption.
                          
                          Supplying a <return>schemaMap</return> provides more security than relying on JSON schemas
                          obtained from the server. It protects against a malicious server
                          advertising a false JSON schema, which could trick the client into sending
                          unencrypted data that should be encrypted.
                          
                          Schemas supplied in the <return>schemaMap</return> only apply to configuring automatic
                          encryption for client side encryption. Other validation rules in the JSON
                          schema will not be enforced by the driver and will result in an error.
                          
                          Automatic encryption is an enterprise only feature that only applies to
                          operations on a collection. Automatic encryption is not supported for
                          operations on a database or view, and operations that are not bypassed
                          will result in error. To bypass automatic encryption for all operations,
                          set <return>bypassAutoEncryption=true</return> in <return>autoEncryption</return>. For more information on
                          whitelisted operations, see the Client-Side Encryption Specification.
                          
                          Path to a correctly hashed certificate directory. The system certificate
                          store will be used by default.
                          
                          Path to file with either a single or bundle of certificate authorities to
                          be considered trusted when making a TLS connection. The system certificate
                          store will be used by default.
                          
                          This option is a deprecated alias for the <return>"tlsCAFile"</return> URI option.
                          
                          SSL context options to be used as fallbacks if a driver option or its
                          equivalent URI option, if any, is not specified. Note that the driver does
                          not consult the default stream context (i.e.
                          <strong>stream_context_get_default()</strong>). The following context options are
                          supported:
                          
                          This option is supported for backwards compatibility, but should be
                          considered deprecated.
                          
                          Allows custom drivers to append their own metadata to the server
                          handshake. By default, the driver submits its own name, version, and
                          platform (i.e. PHP version) in the handshake. Custom drivers can specify
                          strings for the <return>"name"</return>, <return>"version"</return>, and <return>"platform"</return> keys of this array,
                          which will be appended to the respective field(s) in the handshake
                          document.
                          
                          Handshake information is limited to 512 bytes. The driver will truncate
                          handshake data to fit within this 512-byte string. Drivers and ODMs are
                          encouraged to keep their own metadata concise.
                          
                          Path to a PEM encoded certificate to use for client authentication.
                          
                          This option is a deprecated alias for the <return>"tlsCertificateKeyFile"</return> URI
                          option.
                          
                          Passphrase for the PEM encoded certificate (if applicable).
                          
                          This option is a deprecated alias for the <return>"tlsCertificateKeyFilePassword"</return>
                          URI option.
                          
                          Disables certificate validation if <info>true</info>. Defaults to <info>false</info>
                          
                          This option is a deprecated alias for the <return>"tlsAllowInvalidHostnames"</return> URI
                          option.

<comment>See Also:</comment>
   * Connection handling and persistence
   * MongoDB Connection String Format


id: MongoDB\Driver\Manager::createClientEncryption
type: function
doc:
<comment>Description:</comment>
  Create a new ClientEncryption object
  
  Constructs a new <class>MongoDB\Driver\ClientEncryption</class> object with the specified options.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  optionsOptionTypeDescriptionkeyVaultClient<class>MongoDB\Driver\Manager</class>Managerul
                   utilizat pentru a ruta interpelările cheilor de date către un cluster separat
                   MongoDB. Sunt utilizate implicit Managerul și cluster-ul
                   curent.keyVaultNamespace<info>string</info>Un spațiu de nume deplin calificat (de ex.
                   <return>"databaseName.collectionName"</return>) ce denotă colecția ce conține toate cheile de date
                   utilizate pentru criptare și decriptare.kmsProviders<info>array</info> Un document ce conține
                   configurația pentru unul sau mai mulți furnizori KMS, ce vor fi utilizați pentru
                   criptarea cheilor de date. În prezent sunt susținute <return>aws</return> și <return>local</return> și cel puțin
                   unul dintre ei trebuie specificat.  Formatul pentru <return>aws</return> este după cum urmează: ,
                   secretAccessKey:
                   }
                   ]]> Formatul pentru <return>local</return> este după cum urmează: 
                   }
                   ]]>
                   
                   Un document ce conține configurația pentru unul sau mai mulți furnizori KMS, ce
                   vor fi utilizați pentru criptarea cheilor de date. În prezent sunt susținute <return>aws</return>
                   și <return>local</return> și cel puțin unul dintre ei trebuie specificat.
                   
                   Formatul pentru <return>aws</return> este după cum urmează:
                   
                   Formatul pentru <return>local</return> este după cum urmează:

<comment>Return:</comment>
  <info>MongoDB\Driver\ClientEncryption</info>  Returns a new <class>MongoDB\Driver\ClientEncryption</class> instance.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\ClientEncryption</class>
   * Explicit (Manual) Client-Side Field Level Encryption in the MongoDB manual


id: MongoDB\Driver\Manager::executeBulkWrite
type: function
doc:
<comment>Description:</comment>
  Execute one or more write operations
  
  Executes one or more write operations on the primary server.
  
  A <class>MongoDB\Driver\BulkWrite</class> can be constructed with one or more write operations of varying types
  (e.g. updates, deletes, and inserts). The driver will attempt to send operations of the same type
  to the server in as few requests as possible to optimize round trips.

<comment>Param:</comment>
  <info>string                  </info>  <strong>$namespace</strong>  Un spațiu de nume complet calificat (de ex.
                                        <return>"databaseName.collectionName"</return>).
  <info>MongoDB\Driver\BulkWrite</info>  <strong>$bulk     </strong>  Înscrierea sau înscrierile spre a fi executate.
  <info>array                   </info>  <strong>$options  </strong>  optionsOptionTypeDescriptionsession<class>MongoDB\Driver\Session</class> O
                                        sesiune pentru a fi asociată cu operațiunea.
                                        writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de
                                        înscriere pentru a fi aplicată operațiunii.
                                        
                                        O sesiune pentru a fi asociată cu operațiunea.
                                        
                                        O preocupare de înscriere pentru a fi aplicată operațiunii.

<comment>Return:</comment>
  <info>MongoDB\Driver\WriteResult</info>  Întoarce <class>MongoDB\Driver\WriteResult</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\BulkWrite</class>
   * <class>MongoDB\Driver\WriteResult</class>
   * <class>MongoDB\Driver\WriteConcern</class>
   * <strong>MongoDB\Driver\Server::executeBulkWrite()</strong>


id: MongoDB\Driver\Manager::executeCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command
  
  Selects a server according to the <return>"readPreference"</return> option and executes the command on that server.
  By default, the read preference from the MongoDB Connection URI will be used.
  
  This method applies no special logic to the command. Although this method accepts <return>"readConcern"</return>
  and <return>"writeConcern"</return> options, which will be incorporated into the command document, those options
  will not default to corresponding values from the MongoDB Connection URI nor will the MongoDB
  server version be taken into account. Users are therefore encouraged to use specific read and/or
  write command methods if possible.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  
                                    optionsOptionTypeDescriptionreadConcern<class>MongoDB\Driver\ReadConcern</class>
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de citire
                                    pentru a fi folosită la selectarea serverului pentru operațiune.
                                    session<class>MongoDB\Driver\Session</class> O sesiune pentru a fi asociată cu
                                    operațiunea. writeConcern<class>MongoDB\Driver\WriteConcern</class> O
                                    preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    O preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Manager::executeReadCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadWriteCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeWriteCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeCommand()</strong>


id: MongoDB\Driver\Manager::executeQuery
type: function
doc:
<comment>Description:</comment>
  Execute a database query
  
  Selects a server according to the <return>"readPreference"</return> option and executes the query on that server.
  By default, the read preference from the MongoDB Connection URI will be used.

<comment>Param:</comment>
  <info>string              </info>  <strong>$namespace</strong>  Un spațiu de nume complet calificat (de ex.
                                    <return>"databaseName.collectionName"</return>).
  <info>MongoDB\Driver\Query</info>  <strong>$query    </strong>  Interpelarea spre a fi executată.
  <info>array               </info>  <strong>$options  </strong>  
                                    optionsOptionTypeDescriptionreadPreference<class>MongoDB\Driver\ReadPreference</class>
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune. session<class>MongoDB\Driver\Session</class> O
                                    sesiune pentru a fi asociată cu operațiunea.
                                    
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Cursor</class>
   * <class>MongoDB\Driver\Query</class>
   * <class>MongoDB\Driver\ReadPreference</class>
   * <strong>MongoDB\Driver\Server::executeQuery()</strong>


id: MongoDB\Driver\Manager::executeReadCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command that reads
  
  Selects a server according to the <return>"readPreference"</return> option and executes the command on that server.
  By default, the read preference from the MongoDB Connection URI will be used.
  
  This method will apply logic that is specific to commands that read (e.g. count) and take the
  MongoDB server version into account. The <return>"readConcern"</return> option will default to the corresponding
  value from the MongoDB Connection URI.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  
                                    optionsOptionTypeDescriptionreadConcern<class>MongoDB\Driver\ReadConcern</class>
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de citire
                                    pentru a fi folosită la selectarea serverului pentru operațiune.
                                    session<class>MongoDB\Driver\Session</class> O sesiune pentru a fi asociată cu
                                    operațiunea.
                                    
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Manager::executeCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadWriteCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeWriteCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadCommand()</strong>


id: MongoDB\Driver\Manager::executeReadWriteCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command that reads and writes
  
  Executes the command on the primary server.
  
  This method will apply logic that is specific to commands that read and write (e.g. aggregate) and
  take the MongoDB server version into account. The <return>"readConcern"</return> and <return>"writeConcern"</return> options will
  default to the corresponding values from the MongoDB Connection URI.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  
                                    optionsOptionTypeDescriptionreadConcern<class>MongoDB\Driver\ReadConcern</class>
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului. session<class>MongoDB\Driver\Session</class> O
                                    sesiune pentru a fi asociată cu operațiunea.
                                    writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de
                                    înscriere pentru a fi aplicată operațiunii.
                                    
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    O preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Manager::executeCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeWriteCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadWriteCommand()</strong>


id: MongoDB\Driver\Manager::executeWriteCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command that writes
  
  Executes the command on the primary server.
  
  This method will apply logic that is specific to commands that write (e.g. drop) and take the
  MongoDB server version into account. The <return>"writeConcern"</return> option will default to the corresponding
  value from the MongoDB Connection URI.
  
  This method is not intended to be used to execute insert, update, or delete commands. Users are
  encouraged to use <strong>MongoDB\Driver\Manager::executeBulkWrite()</strong> for those commands.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  optionsOptionTypeDescriptionsession<class>MongoDB\Driver\Session</class> O
                                    sesiune pentru a fi asociată cu operațiunea.
                                    writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de
                                    înscriere pentru a fi aplicată operațiunii.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    O preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Manager::executeCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadWriteCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeWriteCommand()</strong>


id: MongoDB\Driver\Manager::getReadConcern
type: function
doc:
<comment>Description:</comment>
  Return the ReadConcern for the Manager
  
  Returns the <class>MongoDB\Driver\ReadConcern</class> for the Manager, which is derived from its URI options.
  This is the default read concern for queries and commands executed on the Manager.

<comment>Return:</comment>
  <info>MongoDB\Driver\ReadConcern</info>  The <class>MongoDB\Driver\ReadConcern</class> for the Manager.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\ReadConcern</class>
   * <strong>MongoDB\Driver\Manager::__construct()</strong>


id: MongoDB\Driver\Manager::getReadPreference
type: function
doc:
<comment>Description:</comment>
  Return the ReadPreference for the Manager
  
  Returns the <class>MongoDB\Driver\ReadPreference</class> for the Manager, which is derived from its URI options.
  This is the default read preference for queries and commands executed on the Manager.

<comment>Return:</comment>
  <info>MongoDB\Driver\ReadPreference</info>  The <class>MongoDB\Driver\ReadPreference</class> for the Manager.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\ReadPreference</class>
   * <strong>MongoDB\Driver\Manager::__construct()</strong>


id: MongoDB\Driver\Manager::getServers
type: function
doc:
<comment>Description:</comment>
  Return the servers to which this manager is connected
  
  Returns an <info>array</info> of <class>MongoDB\Driver\Server</class> instances to which this manager is connected.
  
  Since the driver connects to the database lazily, this method may return an empty <info>array</info> if called
  before executing an operation on the <class>MongoDB\Driver\Manager</class>.

<comment>Return:</comment>
  <info>array</info>  Returns an <info>array</info> of <class>MongoDB\Driver\Server</class> instances to which this manager is connected.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Server</class>
   * <strong>MongoDB\Driver\Manager::selectServer()</strong>


id: MongoDB\Driver\Manager::getWriteConcern
type: function
doc:
<comment>Description:</comment>
  Return the WriteConcern for the Manager
  
  Returns the <class>MongoDB\Driver\WriteConcern</class> for the Manager, which is derived from its URI options.
  This is the default write concern for writes and commands executed on the Manager.

<comment>Return:</comment>
  <info>MongoDB\Driver\WriteConcern</info>  The <class>MongoDB\Driver\WriteConcern</class> for the Manager.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\WriteConcern</class>
   * <strong>MongoDB\Driver\Manager::__construct()</strong>


id: MongoDB\Driver\Manager::selectServer
type: function
doc:
<comment>Description:</comment>
  Select a server matching a read preference
  
  Selects a <class>MongoDB\Driver\Server</class> matching <strong>$readPreference</strong>. This may be used to preselect a server
  in order to perform version checking before executing an operation.
  
  Unlike <strong>MongoDB\Driver\Manager::getServers()</strong>, this method will initialize database connections and
  perform server discovery if necessary. See the Server Selection Specification for additional
  information.

<comment>Param:</comment>
  <info>MongoDB\Driver\ReadPreference</info>  <strong>$readPreference</strong>  The read preference to use for selecting a server.

<comment>Return:</comment>
  <info>MongoDB\Driver\Server</info>  Returns a <class>MongoDB\Driver\Server</class> matching the read preference.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Server</class>
   * <strong>MongoDB\Driver\Manager::getServers()</strong>
   * Server Selection Specification


id: MongoDB\Driver\Manager::startSession
type: function
doc:
<comment>Description:</comment>
  Start a new client session for use with this client
  
  Creates a <class>MongoDB\Driver\Session</class> for the given options. The session may then be specified when
  executing commands, queries, and write operations.
  
  A <class>MongoDB\Driver\Session</class> can only be used with the <class>MongoDB\Driver\Manager</class> from which it was
  created.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  optionsOptionTypeDescriptionDefaultcausalConsistency<info>bool</info> Configure causal
                   consistency in a session. If <info>true</info>, each operation in the session will be causally
                   ordered after the previous read or write operation. Set to <info>false</info> to disable
                   causal consistency.  See Casual Consistency in the MongoDB manual for more
                   information. <info>true</info>defaultTransactionOptions<info>array</info> Default options to apply to newly
                   created transactions. These options are used unless they are overridden when a
                   transaction is started with different value for each option.
                   optionsOptionTypeDescriptionmaxCommitTimeMSinteger Timpul maxim în milisecunde
                   permis pentru rularea comenzii <return>commitTransaction</return>.  Dacă este specificat,
                   <return>maxCommitTimeMS</return> trebuie să fie un întreg pe 32 de biți mai mare sau egal cu zero.
                   readConcern<class>MongoDB\Driver\ReadConcern</class> O preocupare de citire pentru a fi aplicată
                   operațiunii.  Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                   într-o excepție în timpul execuției dacă e specificată pentru o versiune mai
                   veche a serverului. readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de
                   citire pentru a fi folosită la selectarea serverului pentru operațiune.
                   writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de înscriere pentru a fi
                   aplicată operațiunii.  This option is available in MongoDB 4.0+. <return>[]</return>
                   
                   Configure causal consistency in a session. If <info>true</info>, each operation in the session
                   will be causally ordered after the previous read or write operation. Set to <info>false</info>
                   to disable causal consistency.
                   
                   See Casual Consistency in the MongoDB manual for more information.
                   
                   Default options to apply to newly created transactions. These options are used
                   unless they are overridden when a transaction is started with different value for
                   each option.
                   
                   optionsOptionTypeDescriptionmaxCommitTimeMSinteger Timpul maxim în milisecunde
                   permis pentru rularea comenzii <return>commitTransaction</return>.  Dacă este specificat,
                   <return>maxCommitTimeMS</return> trebuie să fie un întreg pe 32 de biți mai mare sau egal cu zero.
                   readConcern<class>MongoDB\Driver\ReadConcern</class> O preocupare de citire pentru a fi aplicată
                   operațiunii.  Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                   într-o excepție în timpul execuției dacă e specificată pentru o versiune mai
                   veche a serverului. readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de
                   citire pentru a fi folosită la selectarea serverului pentru operațiune.
                   writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de înscriere pentru a fi
                   aplicată operațiunii.
                   
                   Timpul maxim în milisecunde permis pentru rularea comenzii <return>commitTransaction</return>.
                   
                   Dacă este specificat, <return>maxCommitTimeMS</return> trebuie să fie un întreg pe 32 de biți mai
                   mare sau egal cu zero.
                   
                   O preocupare de citire pentru a fi aplicată operațiunii.
                   
                   Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta într-o excepție în
                   timpul execuției dacă e specificată pentru o versiune mai veche a serverului.
                   
                   Preferința de citire pentru a fi folosită la selectarea serverului pentru
                   operațiune.
                   
                   O preocupare de înscriere pentru a fi aplicată operațiunii.
                   
                   This option is available in MongoDB 4.0+.

<comment>Return:</comment>
  <info>MongoDB\Driver\Session</info>  Returns a <class>MongoDB\Driver\Session</class>.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Session</class>
   * Casual Consistency in the MongoDB manual


id: MongoDB\Driver\Monitoring\CommandFailedEvent
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Monitoring\CommandFailedEvent</class> class encapsulates information about a failed
  command.


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getCommandName
type: function
doc:
<comment>Description:</comment>
  Returns the command name
  
  Returns the command name (e.g. <return>"find"</return>, <return>"aggregate"</return>).

<comment>Return:</comment>
  <info>string</info>  Returns the command name.

<comment>See Also:</comment>
   * 


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getDurationMicros
type: function
doc:
<comment>Description:</comment>
  Returns the command's duration in microseconds
  
  The command's duration is a calculated value that includes the time to send the message and
  receive the reply from the server.

<comment>Return:</comment>
  <info>int</info>  Returns the command's duration in microseconds.

<comment>See Also:</comment>
   * 


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getError
type: function
doc:
<comment>Description:</comment>
  Returns the Exception associated with the failed command

<comment>Return:</comment>
  <info>Exception</info>  Returns the <class>Exception</class> associated with the failed command.

<comment>See Also:</comment>
   * 


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getOperationId
type: function
doc:
<comment>Description:</comment>
  Returns the command's operation ID
  
  The operation ID is generated by the driver and may be used to link events together such as bulk
  write operations, which may have been split across several commands at the protocol level.
  
  Since multiple commands may share the same operation ID, it is not reliable to use this value to
  associate event objects with each other. The request ID returned by
  MongoDB\Driver\Monitoring\CommandFailedEvent::getRequestId should be used instead.

<comment>Return:</comment>
  <info>string</info>  Returns the command's operation ID.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getOperationId
   * MongoDB\Driver\Monitoring\CommandFailedEvent::getRequestId
   * 


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getReply
type: function
doc:
<comment>Description:</comment>
  Returns the command reply document
  
  The reply document will be converted from BSON to PHP using the default deserialization rules
  (e.g. BSON documents will be converted to <info>stdClass</info>).

<comment>Return:</comment>
  <info>object</info>  Returns the command reply document as a <class>stdClass</class> object.

<comment>See Also:</comment>
   * 
   * 


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getRequestId
type: function
doc:
<comment>Description:</comment>
  Returns the command's request ID
  
  The request ID is generated by the driver and may be used to associate this
  <class>MongoDB\Driver\Monitoring\CommandFailedEvent</class> with a previous
  <class>MongoDB\Driver\Monitoring\CommandStartedEvent</class>.

<comment>Return:</comment>
  <info>string</info>  Returns the command's request ID.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getRequestId
   * 


id: MongoDB\Driver\Monitoring\CommandFailedEvent::getServer
type: function
doc:
<comment>Description:</comment>
  Returns the Server on which the command was executed
  
  Returns the <class>MongoDB\Driver\Server</class> on which the command was executed.

<comment>Return:</comment>
  <info>MongoDB\Driver\Server</info>  Returns the <class>MongoDB\Driver\Server</class> on which the command was executed.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getServer
   * 


id: MongoDB\Driver\Monitoring\CommandStartedEvent
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Monitoring\CommandStartedEvent</class> class encapsulates information about a started
  command.


id: MongoDB\Driver\Monitoring\CommandStartedEvent::getCommand
type: function
doc:
<comment>Description:</comment>
  Returns the command document
  
  The reply document will be converted from BSON to PHP using the default deserialization rules
  (e.g. BSON documents will be converted to <info>stdClass</info>).

<comment>Return:</comment>
  <info>object</info>  Returns the command document as a <class>stdClass</class> object.

<comment>See Also:</comment>
   * 
   * 


id: MongoDB\Driver\Monitoring\CommandStartedEvent::getDatabaseName
type: function
doc:
<comment>Description:</comment>
  Returns the database on which the command was executed

<comment>Return:</comment>
  <info>string</info>  Returns the database on which the command was executed.

<comment>See Also:</comment>
   * 


id: MongoDB\Driver\Monitoring\CommandStartedEvent::getOperationId
type: function
doc:
<comment>Description:</comment>
  Returns the command's operation ID
  
  The operation ID is generated by the driver and may be used to link events together such as bulk
  write operations, which may have been split across several commands at the protocol level.
  
  Since multiple commands may share the same operation ID, it is not reliable to use this value to
  associate event objects with each other. The request ID returned by
  MongoDB\Driver\Monitoring\CommandStartedEvent::getRequestId should be used instead.

<comment>Return:</comment>
  <info>string</info>  Returns the command's operation ID.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandFailedEvent::getOperationId
   * MongoDB\Driver\Monitoring\CommandSucceededEvent::getOperationId
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getRequestId
   * 


id: MongoDB\Driver\Monitoring\CommandStartedEvent::getRequestId
type: function
doc:
<comment>Description:</comment>
  Returns the command's request ID
  
  The request ID is generated by the driver and may be used to associate this
  <class>MongoDB\Driver\Monitoring\CommandStartedEvent</class> with a later
  <class>MongoDB\Driver\Monitoring\CommandFailedEvent</class> or <class>MongoDB\Driver\Monitoring\CommandSucceededEvent</class>.

<comment>Return:</comment>
  <info>string</info>  Returns the command's request ID.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandFailedEvent::getRequestId
   * MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId
   * 


id: MongoDB\Driver\Monitoring\CommandStartedEvent::getServer
type: function
doc:
<comment>Description:</comment>
  Returns the Server on which the command was executed
  
  Returns the <class>MongoDB\Driver\Server</class> on which the command was executed.

<comment>Return:</comment>
  <info>MongoDB\Driver\Server</info>  Returns the <class>MongoDB\Driver\Server</class> on which the command was executed.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandFailedEvent::getServer
   * MongoDB\Driver\Monitoring\CommandSucceededEvent::getServer
   * 


id: MongoDB\Driver\Monitoring\CommandSubscriber
type: class
doc:
<comment>Description:</comment>
  Classes may implement this interface to register an event subscriber that is notified for each
  started, successful, and failed command event. See  for additional information.


id: MongoDB\Driver\Monitoring\CommandSubscriber::commandFailed
type: function
doc:
<comment>Description:</comment>
  Notification method for a failed command
  
  If the subscriber has been registered with <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>, the driver
  will call this method when a command has failed.

<comment>Param:</comment>
  <info>MongoDB\Driver\Monitoring\CommandFailedEvent</info>  <strong>$event</strong>  An event object encapsulating information
                                                        about the failed command.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Monitoring\CommandFailedEvent</class>
   * <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>
   * 


id: MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted
type: function
doc:
<comment>Description:</comment>
  Notification method for a started command
  
  If the subscriber has been registered with <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>, the driver
  will call this method when a command has started.

<comment>Param:</comment>
  <info>MongoDB\Driver\Monitoring\CommandStartedEvent</info>  <strong>$event</strong>  An event object encapsulating information
                                                         about the started command.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Monitoring\CommandStartedEvent</class>
   * <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>
   * 


id: MongoDB\Driver\Monitoring\CommandSubscriber::commandSucceeded
type: function
doc:
<comment>Description:</comment>
  Notification method for a successful command
  
  If the subscriber has been registered with <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>, the driver
  will call this method when a command has succeeded.

<comment>Param:</comment>
  <info>MongoDB\Driver\Monitoring\CommandSucceededEvent</info>  <strong>$event</strong>  An event object encapsulating information
                                                           about the successful command.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Monitoring\CommandSucceededEvent</class>
   * <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>
   * 


id: MongoDB\Driver\Monitoring\CommandSucceededEvent
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Monitoring\CommandSucceededEvent</class> class encapsulates information about a
  successful command.


id: MongoDB\Driver\Monitoring\CommandSucceededEvent::getOperationId
type: function
doc:
<comment>Description:</comment>
  Returns the command's operation ID
  
  The operation ID is generated by the driver and may be used to link events together such as bulk
  write operations, which may have been split across several commands at the protocol level.
  
  Since multiple commands may share the same operation ID, it is not reliable to use this value to
  associate event objects with each other. The request ID returned by
  MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId should be used instead.

<comment>Return:</comment>
  <info>string</info>  Returns the command's operation ID.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getOperationId
   * MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId
   * 


id: MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId
type: function
doc:
<comment>Description:</comment>
  Returns the command's request ID
  
  The request ID is generated by the driver and may be used to associate this
  <class>MongoDB\Driver\Monitoring\CommandSucceededEvent</class> with a previous
  <class>MongoDB\Driver\Monitoring\CommandStartedEvent</class>.

<comment>Return:</comment>
  <info>string</info>  Returns the command's request ID.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getRequestId
   * 


id: MongoDB\Driver\Monitoring\CommandSucceededEvent::getServer
type: function
doc:
<comment>Description:</comment>
  Returns the Server on which the command was executed
  
  Returns the <class>MongoDB\Driver\Server</class> on which the command was executed.

<comment>Return:</comment>
  <info>MongoDB\Driver\Server</info>  Returns the <class>MongoDB\Driver\Server</class> on which the command was executed.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\CommandStartedEvent::getServer
   * MongoDB\Driver\Cursor::getServer
   * MongoDB\Driver\WriteResult::getServer
   * 


id: MongoDB\Driver\Monitoring\Subscriber
type: class
doc:
<comment>Description:</comment>
  Base interface for event subscribers. This is used for type-hinting
  <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong> and <strong>MongoDB\Driver\Monitoring\removeSubscriber()</strong> and
  should not be implemented directly.


id: MongoDB\Driver\Monitoring\addSubscriber
type: function
doc:
<comment>Description:</comment>
  Registers a new monitoring event subscriber
  
  Registers a new monitoring event subscriber with the driver. Registered subscribers will be
  notified of monitoring events through specific methods.
  
  If the object is already registered, this function is a no-op.

<comment>Param:</comment>
  <info>MongoDB\Driver\Monitoring\Subscriber</info>  <strong>$subscriber</strong>  A monitoring event subscriber object to
                                                     register.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\Subscriber
   * MongoDB\Driver\Monitoring\CommandSubscriber
   * <strong>MongoDB\Driver\Monitoring\removeSubscriber()</strong>
   * 


id: MongoDB\Driver\Monitoring\removeSubscriber
type: function
doc:
<comment>Description:</comment>
  Unregisters an existing monitoring event subscriber
  
  Unregisters an existing monitoring event subscriber from the driver. Unregistered subscribers will
  no longer be notified of monitoring events.
  
  If the object is not registered, this function is a no-op.

<comment>Param:</comment>
  <info>MongoDB\Driver\Monitoring\Subscriber</info>  <strong>$subscriber</strong>  A monitoring event subscriber object to
                                                     unregister.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Monitoring\Subscriber
   * MongoDB\Driver\Monitoring\CommandSubscriber
   * <strong>MongoDB\Driver\Monitoring\addSubscriber()</strong>
   * 


id: MongoDB\Driver\Query
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Query</class> class is a value object that represents a database query.


id: MongoDB\Driver\Query::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new Query
  
  Constructs a new <class>MongoDB\Driver\Query</class>, which is an immutable value object that represents a
  database query. The query may then be executed with MongoDB\Driver\Manager::executeQuery.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$filter      </strong>  predicatul interpelării. Un predicat vid se va potrivi cu toate
                              documentele din colecție.
                              
                              La evaluarea criteriilor interpelării MongoDB compară tipurile și
                              valorile conform propriilor reguli de comparație pentru tipuri BSON,
                              care diferă de regulile PHP de comparare și substituirea tipurilor. La
                              potrivirea unui tip special BSON criteriile interpelării trebuie să
                              utilizeze clasa BSON respectivă (de ex. trebuie utilizat
                              <class>MongoDB\BSON\ObjectId</class> pentru a potrivi un ObjectId).
  <info>array      </info>  <strong>$queryOptions</strong>  queryOptionsOptionTypeDescriptionallowDiskUse<info>bool</info> Allows MongoDB to
                              use temporary disk files to store data exceeding the 100 megabyte
                              system memory limit while processing a blocking sort operation.
                              allowPartialResults<info>bool</info> For queries against a sharded collection,
                              returns partial results from the mongos if some shards are unavailable
                              instead of throwing an error.  Falls back to the deprecated <return>"partial"</return>
                              option if not specified. awaitData<info>bool</info> Use in conjunction with the
                              <return>"tailable"</return> option to block a getMore operation on the cursor
                              temporarily if at the end of data rather than returning no data. After
                              a timeout period, the query returns as normal. batchSize<info>int</info> The number
                              of documents to return in the first batch. Defaults to 101. A batch
                              size of 0 means that the cursor will be established, but no documents
                              will be returned in the first batch.  In versions of MongoDB before
                              3.2, where queries use the legacy wire protocol OP_QUERY, a batch size
                              of 1 will close the cursor irrespective of the number of matched
                              documents. collation<info>array</info><info>object</info></info>Collation permite utilizatorilor să
                              indice reguli specifice limbii pentru comparații ale șirurilor de
                              caractere cum ar fi reguli pentru caractere minuscule, majuscule, cu
                              accente. La specificarea collation câmpul <return>"locale"</return> este obligatoriu;
                              restul câmpurilor collation sunt opționale. Pentru descrierile
                              câmpurilor a se vedea Collation Document.  Dacă collation nu este
                              specificat, dar colecția are un collation implicit, atunci operațiunea
                              folosește collation specificat pentru colecție. Dacă nu este
                              specificat un collation pentru colecție sau pentru operație, MongoDB
                              folosește comparația binară simplă, ca în versiunile anterioare,
                              pentru compararea șirurilor de caractere.  Această opțiune este
                              disponibilă în MongoDB 3.4+ și va rezulta într-o excepție în timpul
                              execuției dacă este specificată pentru o versiune mai veche a
                              serverului. comment<info>string</info> A comment to attach to the query to help
                              interpret and trace query profile data.  Falls back to the deprecated
                              <return>"$comment"</return> modifier if not specified. exhaust<info>bool</info> Stream the data down
                              full blast in multiple "more" packages, on the assumption that the
                              client will fully read all data queried. Faster when you are pulling a
                              lot of data and know you want to pull it all down. Note: the client is
                              not allowed to not read all the data unless it closes the connection.
                              This option is not supported by the find command in MongoDB 3.2+ and
                              will force the driver to use the legacy wire protocol version (i.e.
                              OP_QUERY). explain<info>bool</info> If <info>true</info>, the returned <class>MongoDB\Driver\Cursor</class>
                              will contain a single document that describes the process and indexes
                              used to return the query.  Falls back to the deprecated <return>"$explain"</return>
                              modifier if not specified.  This option is not supported by the find
                              command in MongoDB 3.2+ and will only be respected when using the
                              legacy wire protocol version (i.e. OP_QUERY). The explain command
                              should be used on MongoDB 3.0+. hint<info>string</info><info>array</info><info>object</info></info> Index
                              specification. Specify either the index name as a string or the index
                              key pattern. If specified, then the query system will only consider
                              plans using the hinted index.  Falls back to the deprecated <return>"hint"</return>
                              option if not specified. limit<info>int</info> The maximum number of documents to
                              return. If unspecified, then defaults to no limit. A limit of 0 is
                              equivalent to setting no limit.  A negative limit is will be
                              interpreted as a positive limit with the <return>"singleBatch"</return> option set to
                              <info>true</info>. This behavior is supported for backwards compatibility, but
                              should be considered deprecated. max<info>array</info><info>object</info></info> The exclusive upper
                              bound for a specific index.  Falls back to the deprecated <return>"$max"</return>
                              modifier if not specified. maxAwaitTimeMS<info>int</info> Positive integer denoting
                              the time limit in milliseconds for the server to block a getMore
                              operation if no data is available. This option should only be used in
                              conjunction with the <return>"tailable"</return> and <return>"awaitData"</return> options. maxScan<info>int</info>
                              This option is deprecated and should not be used.  Positive integer
                              denoting the maximum number of documents or index keys to scan when
                              executing the query.  Falls back to the deprecated <return>"$maxScan"</return> modifier
                              if not specified. maxTimeMS<info>int</info> The cumulative time limit in
                              milliseconds for processing operations on the cursor. MongoDB aborts
                              the operation at the earliest following interrupt point.  Falls back
                              to the deprecated <return>"$maxTimeMS"</return> modifier if not specified.
                              min<info>array</info><info>object</info></info> The inclusive lower bound for a specific index.  Falls
                              back to the deprecated <return>"$min"</return> modifier if not specified.
                              modifiers<info>array</info>Meta operators modifying the output or behavior of a
                              query. Use of these operators is deprecated in favor of named options.
                              noCursorTimeout<info>bool</info> Prevents the server from timing out idle cursors
                              after an inactivity period (10 minutes). oplogReplay<info>bool</info> Internal use
                              for replica sets. To use oplogReplay, you must include the following
                              condition in the filter:  [ '$gte' =>  ] ]
                              ]]>This option is deprecated as of the 1.8.0
                              release.projection<info>array</info><info>object</info></info> The projection specification to
                              determine which fields to include in the returned documents.  If you
                              are using the ODM functionality to deserialise documents as their
                              original PHP class, make sure that you include the __pclass field in
                              the projection. This is required for the deserialization to work and
                              without it, the driver will return (by default) a <class>stdClass</class> object
                              instead. readConcern<class>MongoDB\Driver\ReadConcern</class> A read concern to apply
                              to the operation. By default, the read concern from the MongoDB
                              Connection URI will be used.  This option is available in MongoDB 3.2+
                              and will result in an exception at execution time if specified for an
                              older server version. returnKey<info>bool</info> If <info>true</info>, returns only the index
                              keys in the resulting documents. Default value is <info>false</info>. If <info>true</info> and
                              the find command does not use an index, the returned documents will be
                              empty.  Falls back to the deprecated <return>"$returnKey"</return> modifier if not
                              specified. showRecordId<info>bool</info> Determines whether to return the record
                              identifier for each document. If <info>true</info>, adds a top-level <return>"$recordId"</return>
                              field to the returned documents.  Falls back to the deprecated
                              <return>"$showDiskLoc"</return> modifier if not specified. singleBatch<info>bool</info> Determines
                              whether to close the cursor after the first batch. Defaults to <info>false</info>.
                              skip<info>int</info>Number of documents to skip. Defaults to 0.slaveOk<info>bool</info>Allow
                              query of replica set secondariessnapshot<info>bool</info> This option is deprecated
                              and should not be used.  Prevents the cursor from returning a document
                              more than once because of an intervening write operation.  Falls back
                              to the deprecated <return>"$snapshot"</return> modifier if not specified.
                              sort<info>array</info><info>object</info></info>The sort specification for the ordering of the results.
                              Falls back to the deprecated <return>"$orderby"</return> modifier if not specified.
                              tailable<info>bool</info>Returns a tailable cursor for a capped collection.
                              
                              Allows MongoDB to use temporary disk files to store data exceeding the
                              100 megabyte system memory limit while processing a blocking sort
                              operation.
                              
                              For queries against a sharded collection, returns partial results from
                              the mongos if some shards are unavailable instead of throwing an
                              error.
                              
                              Falls back to the deprecated <return>"partial"</return> option if not specified.
                              
                              The number of documents to return in the first batch. Defaults to 101.
                              A batch size of 0 means that the cursor will be established, but no
                              documents will be returned in the first batch.
                              
                              In versions of MongoDB before 3.2, where queries use the legacy wire
                              protocol OP_QUERY, a batch size of 1 will close the cursor
                              irrespective of the number of matched documents.
                              
                              Collation permite utilizatorilor să indice reguli specifice limbii
                              pentru comparații ale șirurilor de caractere cum ar fi reguli pentru
                              caractere minuscule, majuscule, cu accente. La specificarea collation
                              câmpul <return>"locale"</return> este obligatoriu; restul câmpurilor collation sunt
                              opționale. Pentru descrierile câmpurilor a se vedea Collation
                              Document.
                              
                              Dacă collation nu este specificat, dar colecția are un collation
                              implicit, atunci operațiunea folosește collation specificat pentru
                              colecție. Dacă nu este specificat un collation pentru colecție sau
                              pentru operație, MongoDB folosește comparația binară simplă, ca în
                              versiunile anterioare, pentru compararea șirurilor de caractere.
                              
                              Această opțiune este disponibilă în MongoDB 3.4+ și va rezulta într-o
                              excepție în timpul execuției dacă este specificată pentru o versiune
                              mai veche a serverului.
                              
                              A comment to attach to the query to help interpret and trace query
                              profile data.
                              
                              Falls back to the deprecated <return>"$comment"</return> modifier if not specified.
                              
                              Stream the data down full blast in multiple "more" packages, on the
                              assumption that the client will fully read all data queried. Faster
                              when you are pulling a lot of data and know you want to pull it all
                              down. Note: the client is not allowed to not read all the data unless
                              it closes the connection.
                              
                              This option is not supported by the find command in MongoDB 3.2+ and
                              will force the driver to use the legacy wire protocol version (i.e.
                              OP_QUERY).
                              
                              If <info>true</info>, the returned <class>MongoDB\Driver\Cursor</class> will contain a single
                              document that describes the process and indexes used to return the
                              query.
                              
                              Falls back to the deprecated <return>"$explain"</return> modifier if not specified.
                              
                              This option is not supported by the find command in MongoDB 3.2+ and
                              will only be respected when using the legacy wire protocol version
                              (i.e. OP_QUERY). The explain command should be used on MongoDB 3.0+.
                              
                              Index specification. Specify either the index name as a string or the
                              index key pattern. If specified, then the query system will only
                              consider plans using the hinted index.
                              
                              Falls back to the deprecated <return>"hint"</return> option if not specified.
                              
                              The maximum number of documents to return. If unspecified, then
                              defaults to no limit. A limit of 0 is equivalent to setting no limit.
                              
                              A negative limit is will be interpreted as a positive limit with the
                              <return>"singleBatch"</return> option set to <info>true</info>. This behavior is supported for
                              backwards compatibility, but should be considered deprecated.
                              
                              The exclusive upper bound for a specific index.
                              
                              Falls back to the deprecated <return>"$max"</return> modifier if not specified.
                              
                              Positive integer denoting the time limit in milliseconds for the
                              server to block a getMore operation if no data is available. This
                              option should only be used in conjunction with the <return>"tailable"</return> and
                              <return>"awaitData"</return> options.
                              
                              This option is deprecated and should not be used.
                              
                              Positive integer denoting the maximum number of documents or index
                              keys to scan when executing the query.
                              
                              Falls back to the deprecated <return>"$maxScan"</return> modifier if not specified.
                              
                              The cumulative time limit in milliseconds for processing operations on
                              the cursor. MongoDB aborts the operation at the earliest following
                              interrupt point.
                              
                              Falls back to the deprecated <return>"$maxTimeMS"</return> modifier if not specified.
                              
                              The inclusive lower bound for a specific index.
                              
                              Falls back to the deprecated <return>"$min"</return> modifier if not specified.
                              
                              Internal use for replica sets. To use oplogReplay, you must include
                              the following condition in the filter:
                              
                               [ '$gte' =>  ] ]
                              ]]>
                              
                              This option is deprecated as of the 1.8.0 release.
                              
                              The projection specification to determine which fields to include in
                              the returned documents.
                              
                              If you are using the ODM functionality to deserialise documents as
                              their original PHP class, make sure that you include the __pclass
                              field in the projection. This is required for the deserialization to
                              work and without it, the driver will return (by default) a <class>stdClass</class>
                              object instead.
                              
                              A read concern to apply to the operation. By default, the read concern
                              from the MongoDB Connection URI will be used.
                              
                              This option is available in MongoDB 3.2+ and will result in an
                              exception at execution time if specified for an older server version.
                              
                              If <info>true</info>, returns only the index keys in the resulting documents.
                              Default value is <info>false</info>. If <info>true</info> and the find command does not use an
                              index, the returned documents will be empty.
                              
                              Falls back to the deprecated <return>"$returnKey"</return> modifier if not specified.
                              
                              Determines whether to return the record identifier for each document.
                              If <info>true</info>, adds a top-level <return>"$recordId"</return> field to the returned documents.
                              
                              Falls back to the deprecated <return>"$showDiskLoc"</return> modifier if not specified.
                              
                              This option is deprecated and should not be used.
                              
                              Prevents the cursor from returning a document more than once because
                              of an intervening write operation.
                              
                              Falls back to the deprecated <return>"$snapshot"</return> modifier if not specified.
                              
                              The sort specification for the ordering of the results.
                              
                              Falls back to the deprecated <return>"$orderby"</return> modifier if not specified.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::executeQuery
   * <class>MongoDB\Driver\Cursor</class>


id: MongoDB\Driver\ReadConcern
type: class
doc:
<comment>Description:</comment>
  <class>MongoDB\Driver\ReadConcern</class> controls the level of isolation for read operations for replica sets
  and replica set shards. This option requires MongoDB 3.2 or later.


id: MongoDB\Driver\ReadConcern::AVAILABLE
type: constant
doc:
<comment>Description:</comment>
  Default for reads against secondaries when <return>afterClusterTime</return>and <return>level</return> are unspecified.
  
  The query returns the instance's most recent data. Provides no guarantee that the data has been
  written to a majority of the replica set members (i.e. may be rolled back).
  
  For unsharded collections (including collections in a standalone deployment or a replica set
  deployment), <return>"local"</return> and <return>"available"</return> read concerns behave identically.
  
  For a sharded cluster, <return>"available"</return> read concern provides greater tolerance for partitions since it
  does not wait to ensure consistency guarantees. However, a query with <return>"available"</return> read concern may
  return orphan documents if the shard is undergoing chunk migrations since the <return>"available"</return> read
  concern, unlike <return>"local"</return> read concern, does not contact the shard's primary nor the config servers
  for updated metadata.


id: MongoDB\Driver\ReadConcern::LINEARIZABLE
type: constant
doc:
<comment>Description:</comment>
  The query returns data that reflects all successful writes issued with a write concern of
  <return>"majority"</return> and acknowledged prior to the start of the read operation. For replica sets that run
  with <return>writeConcernMajorityJournalDefault</return> set to <info>true</info>, linearizable read concern returns data that
  will never be rolled back.
  
  With <return>writeConcernMajorityJournalDefault</return> set to <info>false</info>, MongoDB will not wait for <return>w: "majority"</return>
  writes to be durable before acknowledging the writes. As such, <return>"majority"</return> write operations could
  possibly roll back in the event of a loss of a replica set member.
  
  You can specify linearizable read concern for read operations on the primary only.
  
  Linearizable read concern guarantees only apply if read operations specify a query filter that
  uniquely identifies a single document.
  
  Always use <return>maxTimeMS</return> with linearizable read concern in case a majority of data bearing members are
  unavailable. <return>maxTimeMS</return> ensures that the operation does not block indefinitely and instead ensures
  that the operation returns an error if the read concern cannot be fulfilled.
  
  Linearizable read concern requires MongoDB 3.4.


id: MongoDB\Driver\ReadConcern::LOCAL
type: constant
doc:
<comment>Description:</comment>
  Default for reads against primary if <return>level</return> is unspecified and for reads against secondaries if
  <return>level</return> is unspecified but <return>afterClusterTime</return> is specified.
  
  The query returns the instance's most recent data. Provides no guarantee that the data has been
  written to a majority of the replica set members (i.e. may be rolled back).


id: MongoDB\Driver\ReadConcern::MAJORITY
type: constant
doc:
<comment>Description:</comment>
  The query returns the instance's most recent data acknowledged as having been written to a
  majority of members in the replica set.
  
  To use read concern level of <return>"majority"</return>, replica sets must use WiredTiger storage engine and
  election protocol version 1.


id: MongoDB\Driver\ReadConcern::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new ReadConcern
  
  Constructs a new <class>MongoDB\Driver\ReadConcern</class>, which is an immutable value object.

<comment>Param:</comment>
  <info>string</info>  <strong>$level</strong>  The read concern level. You may use, but are not limited to, one of the class
                  constants.

<comment>See Also:</comment>
   * Read Concern reference


id: MongoDB\Driver\ReadConcern::bsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns an object for BSON serialization

<comment>Return:</comment>
  <info>object</info>  Returns an object for serializing the ReadConcern as BSON.

<comment>See Also:</comment>
   * MongoDB\BSON\Serializable::bsonSerialize
   * Read Concern reference


id: MongoDB\Driver\ReadConcern::getLevel
type: function
doc:
<comment>Description:</comment>
  Returns the ReadConcern's "level" option

<comment>Return:</comment>
  <info>stringnull</info>  Returns the ReadConcern's "level" option.

<comment>See Also:</comment>
   * Read Concern reference


id: MongoDB\Driver\ReadConcern::isDefault
type: function
doc:
<comment>Description:</comment>
  Checks if this is the default read concern
  
  Returns whether this is the default read concern (i.e. no options are specified). This method is
  primarily intended to be used in conjunction with MongoDB\Driver\Manager::getReadConcern to
  determine whether the Manager has been constructed without any read concern options.
  
  The driver will not include a default read concern in its read operations (e.g.
  MongoDB\Driver\Manager::executeQuery) in order order to allow the server to apply its own default.
  Libraries that access the Manager's read concern to include it in their own read commands should
  use this method to ensure that default read concerns are left unset.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if this is the default read concern and <info>false</info> otherwise.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::getReadConcern
   * Read Concern reference


id: MongoDB\Driver\ReadConcern::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a ReadConcern

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\Driver\ReadConcern</class>.

<comment>See Also:</comment>
   * MongoDB\Driver\ReadConcern::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\Driver\ReadConcern::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a ReadConcern

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\Driver\ReadConcern</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\Driver\ReadConcern</class>.

<comment>See Also:</comment>
   * MongoDB\Driver\ReadConcern::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\Driver\ReadPreference::NEAREST
type: constant
doc:
<comment>Description:</comment>
  Operations read from member of the replica set with the least network latency, irrespective of the
  member's type.


id: MongoDB\Driver\ReadPreference::NO_MAX_STALENESS
type: constant
doc:
<comment>Description:</comment>
  The default value for the <return>"maxStalenessSeconds"</return> option is to specify no limit on maximum
  staleness, which means that the driver will not consider a secondary's lag when choosing where to
  direct a read operation.


id: MongoDB\Driver\ReadPreference::PRIMARY
type: constant
doc:
<comment>Description:</comment>
  All operations read from the current replica set primary. This is the default read preference for
  MongoDB.


id: MongoDB\Driver\ReadPreference::PRIMARY_PREFERRED
type: constant
doc:
<comment>Description:</comment>
  In most situations, operations read from the primary but if it is unavailable, operations read
  from secondary members.


id: MongoDB\Driver\ReadPreference::RP_SECONDARY
type: constant
doc:
<comment>Description:</comment>
  All operations read from the secondary members of the replica set.


id: MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED
type: constant
doc:
<comment>Description:</comment>
  In most situations, operations read from secondary members but if no secondary members are
  available, operations read from the primary.


id: MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS
type: constant
doc:
<comment>Description:</comment>
  The minimum value for the <return>"maxStalenessSeconds"</return> option is 90 seconds. The driver estimates
  secondaries' staleness by periodically checking the latest write date of each replica set member.
  Since these checks are infrequent, the staleness estimate is coarse. Thus, the driver cannot
  enforce a max staleness value of less than 90 seconds.


id: MongoDB\Driver\ReadPreference::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new ReadPreference
  
  Constructs a new <class>MongoDB\Driver\ReadPreference</class>, which is an immutable value object.

<comment>Param:</comment>
  <info>stringint</info>  <strong>$mode   </strong>  Read preference modeValueDescription<info>MongoDB\Driver\ReadPreference::RP_PRIMARY</info>
                       or <return>"primary"</return> All operations read from the current replica set primary. This
                       is the default read preference for MongoDB.
                       <info>MongoDB\Driver\ReadPreference::RP_PRIMARY_PREFERRED</info> or <return>"primaryPreferred"</return> In
                       most situations, operations read from the primary but if it is unavailable,
                       operations read from secondary members.
                       <info>MongoDB\Driver\ReadPreference::RP_SECONDARY</info> or <return>"secondary"</return> All operations
                       read from the secondary members of the replica set.
                       <info>MongoDB\Driver\ReadPreference::RP_SECONDARY_PREFERRED</info> or <return>"secondaryPreferred"</return>
                       In most situations, operations read from secondary members but if no
                       secondary members are available, operations read from the primary.
                       <info>MongoDB\Driver\ReadPreference::RP_NEAREST</info> or <return>"nearest"</return> Operations read from
                       member of the replica set with the least network latency, irrespective of the
                       member's type.
                       
                       All operations read from the current replica set primary. This is the default
                       read preference for MongoDB.
                       
                       In most situations, operations read from the primary but if it is
                       unavailable, operations read from secondary members.
                       
                       All operations read from the secondary members of the replica set.
                       
                       In most situations, operations read from secondary members but if no
                       secondary members are available, operations read from the primary.
                       
                       Operations read from member of the replica set with the least network
                       latency, irrespective of the member's type.
  <info>array    </info>  <strong>$tagSets</strong>  Tag sets allow you to target read operations to specific members of a replica
                       set. This parameter should be an array of associative arrays, each of which
                       contain zero or more key/value pairs. When selecting a server for a read
                       operation, the driver attempt to select a node having all tags in a set (i.e.
                       the associative array of key/value pairs). If selection fails, the driver
                       will attempt subsequent sets. An empty tag set (<return>array()</return>) will match any node
                       and may be used as a fallback.
                       
                       Tags are not compatible with the <info>MongoDB\Driver\ReadPreference::RP_PRIMARY</info>
                       mode and, in general, only apply when selecting a secondary member of a set
                       for a read operation. However, the <info>MongoDB\Driver\ReadPreference::RP_NEAREST</info>
                       mode, when combined with a tag set, selects the matching member with the
                       lowest network latency. This member may be a primary or secondary.
  <info>array    </info>  <strong>$options</strong>  optionsOptionTypeDescriptionhedge<info>object</info><info>array</info></info>Specifies whether to use hedged
                       reads, which are supported by MongoDB 4.4+ for sharded queries. Server hedged
                       reads are available for all non-primary read preferences and are enabled by
                       default when using the <return>"nearest"</return> mode. This option allows explicitly enabling
                       server hedged reads for non-primary read preferences by specifying <return>['enabled'
                       =&gt; true]</return>, or explicitly disabling server hedged reads for the <return>"nearest"</return>
                       read preference by specifying <return>['enabled' =&gt; false]</return>. maxStalenessSeconds<info>int</info>
                       Specifies a maximum replication lag, or "staleness", for reads from
                       secondaries. When a secondary's estimated staleness exceeds this value, the
                       driver stops using it for read operations.  If specified, the max staleness
                       must be a signed 32-bit integer greater than or equal to
                       <info>MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS</info>.  Defaults to
                       <info>MongoDB\Driver\ReadPreference::NO_MAX_STALENESS</info>, which means that the driver
                       will not consider a secondary's lag when choosing where to direct a read
                       operation.  This option is not compatible with the
                       <info>MongoDB\Driver\ReadPreference::RP_PRIMARY</info> mode. Specifying a max staleness
                       also requires all MongoDB instances in the deployment to be using MongoDB
                       3.4+. An exception will be thrown at execution time if any MongoDB instances
                       in the deployment are of an older server version.
                       
                       Specifies whether to use hedged reads, which are supported by MongoDB 4.4+
                       for sharded queries.
                       
                       Server hedged reads are available for all non-primary read preferences and
                       are enabled by default when using the <return>"nearest"</return> mode. This option allows
                       explicitly enabling server hedged reads for non-primary read preferences by
                       specifying <return>['enabled' =&gt; true]</return>, or explicitly disabling server hedged
                       reads for the <return>"nearest"</return> read preference by specifying <return>['enabled' =&gt;
                       false]</return>.
                       
                       Specifies a maximum replication lag, or "staleness", for reads from
                       secondaries. When a secondary's estimated staleness exceeds this value, the
                       driver stops using it for read operations.
                       
                       If specified, the max staleness must be a signed 32-bit integer greater than
                       or equal to <info>MongoDB\Driver\ReadPreference::SMALLEST_MAX_STALENESS_SECONDS</info>.
                       
                       Defaults to <info>MongoDB\Driver\ReadPreference::NO_MAX_STALENESS</info>, which means that
                       the driver will not consider a secondary's lag when choosing where to direct
                       a read operation.
                       
                       This option is not compatible with the
                       <info>MongoDB\Driver\ReadPreference::RP_PRIMARY</info> mode. Specifying a max staleness
                       also requires all MongoDB instances in the deployment to be using MongoDB
                       3.4+. An exception will be thrown at execution time if any MongoDB instances
                       in the deployment are of an older server version.

<comment>See Also:</comment>
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::bsonSerialize
type: function
doc:
<comment>Description:</comment>
  Returns an object for BSON serialization

<comment>Return:</comment>
  <info>object</info>  Returns an object for serializing the ReadPreference as BSON.

<comment>See Also:</comment>
   * MongoDB\BSON\Serializable::bsonSerialize
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::getHedge
type: function
doc:
<comment>Description:</comment>
  Returns the ReadPreference's "hedge" option

<comment>Return:</comment>
  <info>objectnull</info>  Returns the ReadPreference's "hedge" option.

<comment>See Also:</comment>
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::getMaxStalenessSeconds
type: function
doc:
<comment>Description:</comment>
  Returns the ReadPreference's "maxStalenessSeconds" option

<comment>Return:</comment>
  <info>int</info>  Returns the ReadPreference's "maxStalenessSeconds" option. If no max staleness has been
       specified, <info>MongoDB\Driver\ReadPreference::NO_MAX_STALENESS</info> will be returned.

<comment>See Also:</comment>
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::getMode
type: function
doc:
<comment>Description:</comment>
  Returns the ReadPreference's "mode" option

<comment>Return:</comment>
  <info>int</info>  Returns the ReadPreference's "mode" option.

<comment>See Also:</comment>
   * MongoDB\Driver\ReadPreference::getModeString
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::getModeString
type: function
doc:
<comment>Description:</comment>
  Returns the ReadPreference's "mode" option as a string

<comment>Return:</comment>
  <info>string</info>  Returns the ReadPreference's "mode" option as a string.

<comment>See Also:</comment>
   * MongoDB\Driver\ReadPreference::getMode
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::getTagSets
type: function
doc:
<comment>Description:</comment>
  Returns the ReadPreference's "tagSets" option

<comment>Return:</comment>
  <info>array</info>  Returns the ReadPreference's "tagSets" option.

<comment>See Also:</comment>
   * Read Preference reference


id: MongoDB\Driver\ReadPreference::serialize
type: function
doc:
<comment>Description:</comment>
  Serialize a ReadPreference

<comment>Return:</comment>
  <info>string</info>  Returns the serialized representation of the <class>MongoDB\Driver\ReadPreference</class>.

<comment>See Also:</comment>
   * MongoDB\Driver\ReadPreference::unserialize
   * <strong>serialize()</strong>
   * Serializing Objects


id: MongoDB\Driver\ReadPreference::unserialize
type: function
doc:
<comment>Description:</comment>
  Unserialize a ReadPreference

<comment>Param:</comment>
  <info>string</info>  <strong>$serialized</strong>  The serialized <class>MongoDB\Driver\ReadPreference</class>.

<comment>Return:</comment>
  <info>void</info>  Returns the unserialized <class>MongoDB\Driver\ReadPreference</class>.

<comment>See Also:</comment>
   * MongoDB\Driver\ReadPreference::serialize
   * <strong>unserialize()</strong>
   * Serializing Objects


id: MongoDB\Driver\Server::TYPE_POSSIBLE_PRIMARY
type: constant
doc:
<comment>Description:</comment>
  Replica set possible primary server type, returned by MongoDB\Driver\Server::getType.
  
  A server may be identified as a possible primary if it has not yet been checked but another memory
  of the replica set thinks it is the primary.


id: MongoDB\Driver\Server::TYPE_RS_ARBITER
type: constant
doc:
<comment>Description:</comment>
  Replica set arbiter server type, returned by MongoDB\Driver\Server::getType.


id: MongoDB\Driver\Server::TYPE_RS_GHOST
type: constant
doc:
<comment>Description:</comment>
  Replica set ghost server type, returned by MongoDB\Driver\Server::getType.
  
  Servers may be identified as such in at least three situations: briefly during server startup; in
  an uninitialized replica set; or when the server is shunned (i.e. removed from the replica set
  config). They cannot be queried, nor can their host list be used to discover the current replica
  set configuration; however, the client may monitor this server in hope that it transitions to a
  more useful state.


id: MongoDB\Driver\Server::TYPE_RS_OTHER
type: constant
doc:
<comment>Description:</comment>
  Replica set other server type, returned by MongoDB\Driver\Server::getType.
  
  Such servers may be hidden, starting up, or recovering. They cannot be queried, but their hosts
  lists are useful for discovering the current replica set configuration.


id: MongoDB\Driver\Server::TYPE_RS_PRIMARY
type: constant
doc:
<comment>Description:</comment>
  Replica set primary server type, returned by MongoDB\Driver\Server::getType.


id: MongoDB\Driver\Server::TYPE_RS_SECONDARY
type: constant
doc:
<comment>Description:</comment>
  Replica set secondary server type, returned by MongoDB\Driver\Server::getType.


id: MongoDB\Driver\Server::TYPE_STANDALONE
type: constant
doc:
<comment>Description:</comment>
  Standalone server type, returned by MongoDB\Driver\Server::getType.


id: MongoDB\Driver\Server::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new Server (not used)
  
  <class>MongoDB\Driver\Server</class> objects are created internally by <class>MongoDB\Driver\Manager</class> when a database
  connection is established and may be returned by <strong>MongoDB\Driver\Manager::getServers()</strong> and
  <strong>MongoDB\Driver\Manager::selectServer()</strong>.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Manager::getServers()</strong>
   * <strong>MongoDB\Driver\Manager::selectServer()</strong>


id: MongoDB\Driver\Server::executeBulkWrite
type: function
doc:
<comment>Description:</comment>
  Execute one or more write operations on this server
  
  Executes one or more write operations on this server.
  
  A <class>MongoDB\Driver\BulkWrite</class> can be constructed with one or more write operations of varying types
  (e.g. updates, deletes, and inserts). The driver will attempt to send operations of the same type
  to the server in as few requests as possible to optimize round trips.

<comment>Param:</comment>
  <info>string                  </info>  <strong>$namespace</strong>  Un spațiu de nume complet calificat (de ex.
                                        <return>"databaseName.collectionName"</return>).
  <info>MongoDB\Driver\BulkWrite</info>  <strong>$bulk     </strong>  Înscrierea sau înscrierile spre a fi executate.
  <info>array                   </info>  <strong>$options  </strong>  optionsOptionTypeDescriptionsession<class>MongoDB\Driver\Session</class> O
                                        sesiune pentru a fi asociată cu operațiunea.
                                        writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de
                                        înscriere pentru a fi aplicată operațiunii.
                                        
                                        O sesiune pentru a fi asociată cu operațiunea.
                                        
                                        O preocupare de înscriere pentru a fi aplicată operațiunii.

<comment>Return:</comment>
  <info>MongoDB\Driver\WriteResult</info>  Întoarce <class>MongoDB\Driver\WriteResult</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\BulkWrite</class>
   * <class>MongoDB\Driver\WriteResult</class>
   * <class>MongoDB\Driver\WriteConcern</class>
   * <strong>MongoDB\Driver\Manager::executeBulkWrite()</strong>


id: MongoDB\Driver\Server::executeCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command on this server
  
  Executes the command on this server.
  
  This method applies no special logic to the command. Although this method accepts <return>"readConcern"</return>
  and <return>"writeConcern"</return> options, which will be incorporated into the command document, those options
  will not default to corresponding values from the MongoDB Connection URI nor will the MongoDB
  server version be taken into account. Users are therefore encouraged to use specific read and/or
  write command methods if possible.
  
  Opțiunea <return>"readPreference"</return> nu controlează serverul spre care driver-ul transmite operațiunea; ea
  întotdeauna va fi executată pe acest obiect al serverului. În loc, aceasta poate fi utilizată la
  transmiterea operațiunii către un secundar (printr-o conexiune către un set de replicare, nu către
  un secundar de sine stătător) sau către un nod mongo pentru a vă asigura că driver-ul stabilește
  protocolul de înscriere în mod corespunzător sau adaugă la operațiune preferința de citire
  corespunzătoare.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  
                                    optionsOptionTypeDescriptionreadConcern<class>MongoDB\Driver\ReadConcern</class>
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de citire
                                    pentru a fi folosită la selectarea serverului pentru operațiune.
                                    session<class>MongoDB\Driver\Session</class> O sesiune pentru a fi asociată cu
                                    operațiunea. writeConcern<class>MongoDB\Driver\WriteConcern</class> O
                                    preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    O preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Server::executeReadCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadWriteCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeWriteCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeCommand()</strong>


id: MongoDB\Driver\Server::executeQuery
type: function
doc:
<comment>Description:</comment>
  Execute a database query on this server
  
  Executes the query on this server.
  
  The <return>"readPreference"</return> option does not control the server to which the driver issues the operation;
  it will always be executed on this server object. Instead, it may be used when issuing the
  operation to a secondary (from a replica set connection, not standalone) or mongos node to ensure
  that the driver sets the wire protocol accordingly or adds the read preference to the operation,
  respectively.

<comment>Param:</comment>
  <info>string              </info>  <strong>$namespace</strong>  Un spațiu de nume complet calificat (de ex.
                                    <return>"databaseName.collectionName"</return>).
  <info>MongoDB\Driver\Query</info>  <strong>$query    </strong>  Interpelarea spre a fi executată.
  <info>array               </info>  <strong>$options  </strong>  
                                    optionsOptionTypeDescriptionreadPreference<class>MongoDB\Driver\ReadPreference</class>
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune. session<class>MongoDB\Driver\Session</class> O
                                    sesiune pentru a fi asociată cu operațiunea.
                                    
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Cursor</class>
   * <class>MongoDB\Driver\Query</class>
   * <class>MongoDB\Driver\ReadPreference</class>
   * <strong>MongoDB\Driver\Manager::executeQuery()</strong>


id: MongoDB\Driver\Server::executeReadCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command that reads on this server
  
  Executes the command on this server.
  
  This method will apply logic that is specific to commands that read (e.g. count) and take the
  MongoDB server version into account. The <return>"readConcern"</return> option will default to the corresponding
  value from the MongoDB Connection URI.
  
  Opțiunea <return>"readPreference"</return> nu controlează serverul spre care driver-ul transmite operațiunea; ea
  întotdeauna va fi executată pe acest obiect al serverului. În loc, aceasta poate fi utilizată la
  transmiterea operațiunii către un secundar (printr-o conexiune către un set de replicare, nu către
  un secundar de sine stătător) sau către un nod mongo pentru a vă asigura că driver-ul stabilește
  protocolul de înscriere în mod corespunzător sau adaugă la operațiune preferința de citire
  corespunzătoare.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  
                                    optionsOptionTypeDescriptionreadConcern<class>MongoDB\Driver\ReadConcern</class>
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de citire
                                    pentru a fi folosită la selectarea serverului pentru operațiune.
                                    session<class>MongoDB\Driver\Session</class> O sesiune pentru a fi asociată cu
                                    operațiunea.
                                    
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    
                                    Preferința de citire pentru a fi folosită la selectarea
                                    serverului pentru operațiune.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Server::executeCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadWriteCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeWriteCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadCommand()</strong>


id: MongoDB\Driver\Server::executeReadWriteCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command that reads and writes on this server
  
  Executes the command on this server.
  
  This method will apply logic that is specific to commands that read and write (e.g. aggregate) and
  take the MongoDB server version into account. The <return>"readConcern"</return> and <return>"writeConcern"</return> options will
  default to the corresponding values from the MongoDB Connection URI.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  
                                    optionsOptionTypeDescriptionreadConcern<class>MongoDB\Driver\ReadConcern</class>
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului. session<class>MongoDB\Driver\Session</class> O
                                    sesiune pentru a fi asociată cu operațiunea.
                                    writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de
                                    înscriere pentru a fi aplicată operațiunii.
                                    
                                    O preocupare de citire pentru a fi aplicată operațiunii.
                                    
                                    Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                                    într-o excepție în timpul execuției dacă e specificată pentru o
                                    versiune mai veche a serverului.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    O preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Server::executeCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeWriteCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeReadWriteCommand()</strong>


id: MongoDB\Driver\Server::executeWriteCommand
type: function
doc:
<comment>Description:</comment>
  Execute a database command that writes on this server
  
  Executes the command on this server.
  
  This method will apply logic that is specific to commands that write (e.g. drop) and take the
  MongoDB server version into account. The <return>"writeConcern"</return> option will default to the corresponding
  value from the MongoDB Connection URI.
  
  This method is not intended to be used to execute insert, update, or delete commands. Users are
  encouraged to use <strong>MongoDB\Driver\Server::executeBulkWrite()</strong> for those commands.

<comment>Param:</comment>
  <info>string                </info>  <strong>$db     </strong>  Denumirea bazei de date asupra căreia va fi executată comanda.
  <info>MongoDB\Driver\Command</info>  <strong>$command</strong>  Comanda spre a fi executată.
  <info>array                 </info>  <strong>$options</strong>  optionsOptionTypeDescriptionsession<class>MongoDB\Driver\Session</class> O
                                    sesiune pentru a fi asociată cu operațiunea.
                                    writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de
                                    înscriere pentru a fi aplicată operațiunii.
                                    
                                    O sesiune pentru a fi asociată cu operațiunea.
                                    
                                    O preocupare de înscriere pentru a fi aplicată operațiunii.
                                    
                                    Dacă utilizați un <return>"session"</return> care are o tranzacție în
                                    desfășurare, nu puteți specifica opțiunile <return>"readConcern"</return> sau
                                    <return>"writeConcern"</return>. Aceasta va rezulta în emiterea unei excepții
                                    <class>MongoDB\Driver\Exception\InvalidArgumentException</class>. În loc,
                                    trebuie să stabiliți aceste două opțiuni când creați tranzacția
                                    cu MongoDB\Driver\Session::startTransaction.

<comment>Return:</comment>
  <info>MongoDB\Driver\Cursor</info>  Întoarce <class>MongoDB\Driver\Cursor</class> în caz de succes.

<comment>See Also:</comment>
   * <class>MongoDB\Driver\Command</class>
   * <class>MongoDB\Driver\Cursor</class>
   * <strong>MongoDB\Driver\Server::executeCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadCommand()</strong>
   * <strong>MongoDB\Driver\Server::executeReadWriteCommand()</strong>
   * <strong>MongoDB\Driver\Manager::executeWriteCommand()</strong>


id: MongoDB\Driver\Server::getHost
type: function
doc:
<comment>Description:</comment>
  Returns the hostname of this server
  
  Returns the hostname of this server.

<comment>Return:</comment>
  <info>string</info>  Returns the hostname of this server.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::getInfo
type: function
doc:
<comment>Description:</comment>
  Returns an array of information about this server
  
  Returns an array of information about this server.

<comment>Return:</comment>
  <info>array</info>  Returns an array of information about this server.


id: MongoDB\Driver\Server::getLatency
type: function
doc:
<comment>Description:</comment>
  Returns the latency of this server
  
  Returns the latency of this server (i.e. the client's measured round trip time of an <return>ismaster</return>
  command).

<comment>Return:</comment>
  <info>string</info>  Returns the latency of this server.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>
   * Server Discovery and Monitoring Specification


id: MongoDB\Driver\Server::getPort
type: function
doc:
<comment>Description:</comment>
  Returns the port on which this server is listening
  
  Returns the port on which this server is listening.

<comment>Return:</comment>
  <info>int</info>  Returns the port on which this server is listening.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::getTags
type: function
doc:
<comment>Description:</comment>
  Returns an array of tags describing this server in a replica set
  
  Returns an <info>array</info> of tags used to describe this server in a replica set. The array will contain
  zero or more <info>string</info> key and value pairs.

<comment>Return:</comment>
  <info>array</info>  Returns an <info>array</info> of tags used to describe this server in a replica set.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::getType
type: function
doc:
<comment>Description:</comment>
  Returns an integer denoting the type of this server
  
  Returns an <info>int</info> denoting the type of this server. The value will correlate with a
  <class>MongoDB\Driver\Server</class> constant.

<comment>Return:</comment>
  <info>int</info>  Returns an <info>int</info> denoting the type of this server.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::isArbiter
type: function
doc:
<comment>Description:</comment>
  Checks if this server is an arbiter member of a replica set
  
  Returns whether this server is an arbiter member of a replica set.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if this server is an arbiter member of a replica set, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::isHidden
type: function
doc:
<comment>Description:</comment>
  Checks if this server is a hidden member of a replica set
  
  Returns whether this server is a hidden member of a replica set.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if this server is a hidden member of a replica set, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::isPassive
type: function
doc:
<comment>Description:</comment>
  Checks if this server is a passive member of a replica set
  
  Returns whether this server is a passive member of a replica set (i.e. its priority is <return>0</return>).

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if this server is a passive member of a replica set, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::isPrimary
type: function
doc:
<comment>Description:</comment>
  Checks if this server is a primary member of a replica set
  
  Returns whether this server is a primary member of a replica set.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if this server is a primary member of a replica set, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Server::isSecondary
type: function
doc:
<comment>Description:</comment>
  Checks if this server is a secondary member of a replica set
  
  Returns whether this server is a secondary member of a replica set.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if this server is a secondary member of a replica set, and <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Server::getInfo()</strong>


id: MongoDB\Driver\Session
type: class
doc:
<comment>Description:</comment>
  The <class>MongoDB\Driver\Session</class> class represents a client session and is returned by
  MongoDB\Driver\Manager::startSession. Commands, queries, and write operations may then be
  associated the session.


id: MongoDB\Driver\Session::TRANSACTION_STARTING
type: constant
doc:
<comment>Description:</comment>
  A transaction has been started, but no operation has been sent to the server.


id: MongoDB\Driver\Session::__construct
type: function
doc:
<comment>Description:</comment>
  Create a new Session (not used)
  
  <class>MongoDB\Driver\Session</class> objects are returned by MongoDB\Driver\Manager::startSession and cannot be
  constructed directly.

<comment>See Also:</comment>
   * <strong>MongoDB\Driver\Manager::startSession()</strong>


id: MongoDB\Driver\Session::abortTransaction
type: function
doc:
<comment>Description:</comment>
  Aborts a transaction
  
  Terminates the multi-document transaction and rolls back any data changes made by the operations
  within the transaction. That is, the transaction ends without saving any of the changes made by
  the operations in the transaction.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::startSession
   * MongoDB\Driver\Session::commitTransaction
   * MongoDB\Driver\Session::startTransaction


id: MongoDB\Driver\Session::advanceClusterTime
type: function
doc:
<comment>Description:</comment>
  Advances the cluster time for this session
  
  Advances the cluster time for this session. If the cluster time is less than or equal to the
  session's current cluster time, this function is a no-op.
  
  By using this method in conjunction with MongoDB\Driver\Session::advanceOperationTime to copy the
  cluster and operation times from another session, you can ensure that operations in this session
  are causally consistent with the last operation in the other session.

<comment>Param:</comment>
  <info>arrayobject</info>  <strong>$clusterTime</strong>  The cluster time is a document containing a logical timestamp and
                             server signature. Typically, this value will be obtained by calling
                             MongoDB\Driver\Session::getClusterTime on another session object.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::advanceOperationTime
   * MongoDB\Driver\Session::getClusterTime


id: MongoDB\Driver\Session::advanceOperationTime
type: function
doc:
<comment>Description:</comment>
  Advances the operation time for this session
  
  Advances the operation time for this session. If the operation time is less than or equal to the
  session's current operation time, this function is a no-op.
  
  By using this method in conjunction with MongoDB\Driver\Session::advanceClusterTime to copy the
  operation and cluster times from another session, you can ensure that operations in this session
  are causally consistent with the last operation in the other session.

<comment>Param:</comment>
  <info>MongoDB\BSON\TimestampInterface</info>  <strong>$operationTime</strong>  The operation time is a logical timestamp.
                                                   Typically, this value will be obtained by calling
                                                   MongoDB\Driver\Session::getOperationTime on
                                                   another session object.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::advanceClusterTime
   * MongoDB\Driver\Session::getClusterTime


id: MongoDB\Driver\Session::commitTransaction
type: function
doc:
<comment>Description:</comment>
  Commits a transaction
  
  Saves the changes made by the operations in the multi-document transaction and ends the
  transaction. Until the commit, none of the data changes made from within the transaction are
  visible outside the transaction.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::startSession
   * MongoDB\Driver\Session::abortTransaction
   * MongoDB\Driver\Session::startTransaction
   * MongoDB\Driver\Exception\RuntimeException::hasErrorLabel


id: MongoDB\Driver\Session::endSession
type: function
doc:
<comment>Description:</comment>
  Terminates a session
  
  This method closes an existing session. If a transaction was associated with this session, the
  transaction will be aborted. After calling this method, applications should not invoke other
  methods on the session.
  
  Sessions are also closed during garbage collection. It should not be necessary to call this method
  under normal circumstances.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::startSession
   * MongoDB\Driver\Session::abortTransaction
   * MongoDB\Driver\Session::commitTransaction
   * MongoDB\Driver\Session::startTransaction


id: MongoDB\Driver\Session::getClusterTime
type: function
doc:
<comment>Description:</comment>
  Returns the cluster time for this session
  
  Returns the cluster time for this session. If the session has not been used for any operation and
  MongoDB\Driver\Session::advanceClusterTime has not been called, the cluster time will be <info>null</info>.

<comment>Return:</comment>
  <info>objectnull</info>  Returns the cluster time for this session, or <info>null</info> if the session has no cluster time.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::advanceClusterTime


id: MongoDB\Driver\Session::getLogicalSessionId
type: function
doc:
<comment>Description:</comment>
  Returns the logical session ID for this session
  
  Returns the logical session ID for this session, which may be used to identify this session's
  operations on the server.

<comment>Return:</comment>
  <info>object</info>  Returns the logical session ID for this session.


id: MongoDB\Driver\Session::getOperationTime
type: function
doc:
<comment>Description:</comment>
  Returns the operation time for this session
  
  Returns the operation time for this session. If the session has not been used for any operation
  and MongoDB\Driver\Session::advanceOperationTime has not been called, the operation time will be
  <info>null</info>

<comment>Return:</comment>
  <info>MongoDB\BSON\Timestampnull</info>  Returns the operation time for this session, or <info>null</info> if the session
                              has no operation time.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::advanceOperationTime


id: MongoDB\Driver\Session::getServer
type: function
doc:
<comment>Description:</comment>
  Returns the server to which this session is pinned
  
  Returns the <class>MongoDB\Driver\Server</class> to which this session is pinned. If the session is not pinned to
  a server, <info>null</info> will be returned.
  
  Session pinning is primarily used for sharded transactions, as all commands within a sharded
  transaction must be sent to the same mongos instance. This method is intended to be used by
  libraries built atop the extension to allow use of a pinned server instead of invoking server
  selection.

<comment>Return:</comment>
  <info>MongoDB\Driver\Servernull</info>  Returns the <class>MongoDB\Driver\Server</class> to which this session is pinned, or
                             <info>null</info> if the session is not pinned to any server.


id: MongoDB\Driver\Session::getTransactionOptions
type: function
doc:
<comment>Description:</comment>
  Returns options for the currently running transaction
  
  Returns options for the currently running transaction.

<comment>Return:</comment>
  <info>arraynull</info>  Returns a <info>array</info> containing current transaction options, or <info>null</info> if no transaction is
             running.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::getTransactionState


id: MongoDB\Driver\Session::getTransactionState
type: function
doc:
<comment>Description:</comment>
  Returns the current transaction state for this session
  
  Returns the transaction state for this session.

<comment>Return:</comment>
  <info>string</info>  Returns the current transaction state for this session.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::isInTransaction
   * MongoDB\Driver\Session::getTransactionOptions


id: MongoDB\Driver\Session::isInTransaction
type: function
doc:
<comment>Description:</comment>
  Returns whether a multi-document transaction is in progress
  
  Returns whether a multi-document transaction is currently in progress for this session. A
  transaction is considered "in progress" if it has been started but has not been committed or
  aborted.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if a transaction is currently in progress for this session, and <info>false</info>
        otherwise.

<comment>See Also:</comment>
   * MongoDB\Driver\Session::getTransactionState


id: MongoDB\Driver\Session::startTransaction
type: function
doc:
<comment>Description:</comment>
  Starts a transaction
  
  Starts a multi-document transaction associated with the session. At any given time, you can have
  at most one open transaction for a session. After starting a transaction, the session object must
  be passed to each operation via the <return>"session"</return> option (e.g.
  MongoDB\Driver\Manager::executeBulkWrite) in order to associate that operation with the
  transaction.
  
  Transactions can be committed through MongoDB\Driver\Session::commitTransaction, and aborted with
  MongoDB\Driver\Session::abortTransaction. Transactions are also automatically aborted when the
  session is closed from garbage collection or by explicitly calling
  MongoDB\Driver\Session::endSession.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  Options can be passed as argument to this method. Each element in this options
                   array overrides the corresponding option from the <return>"defaultTransactionOptions"</return>
                   option, if set when starting the session with
                   MongoDB\Driver\Manager::startSession.
                   
                   optionsOptionTypeDescriptionmaxCommitTimeMSinteger Timpul maxim în milisecunde
                   permis pentru rularea comenzii <return>commitTransaction</return>.  Dacă este specificat,
                   <return>maxCommitTimeMS</return> trebuie să fie un întreg pe 32 de biți mai mare sau egal cu zero.
                   readConcern<class>MongoDB\Driver\ReadConcern</class> O preocupare de citire pentru a fi aplicată
                   operațiunii.  Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta
                   într-o excepție în timpul execuției dacă e specificată pentru o versiune mai
                   veche a serverului. readPreference<class>MongoDB\Driver\ReadPreference</class> Preferința de
                   citire pentru a fi folosită la selectarea serverului pentru operațiune.
                   writeConcern<class>MongoDB\Driver\WriteConcern</class> O preocupare de înscriere pentru a fi
                   aplicată operațiunii.
                   
                   Timpul maxim în milisecunde permis pentru rularea comenzii <return>commitTransaction</return>.
                   
                   Dacă este specificat, <return>maxCommitTimeMS</return> trebuie să fie un întreg pe 32 de biți mai
                   mare sau egal cu zero.
                   
                   O preocupare de citire pentru a fi aplicată operațiunii.
                   
                   Această opțiune este disponibilă în MongoDB 3.2+ și va rezulta într-o excepție în
                   timpul execuției dacă e specificată pentru o versiune mai veche a serverului.
                   
                   Preferința de citire pentru a fi folosită la selectarea serverului pentru
                   operațiune.
                   
                   O preocupare de înscriere pentru a fi aplicată operațiunii.

<comment>Return:</comment>
  <info>void</info>  Nu este întoarsă nici o valoare.

<comment>See Also:</comment>
   * MongoDB\Driver\Manager::startSession
   * MongoDB\Driver\Session::commitTransaction
   * MongoDB\Driver\Session::abortTransaction


