<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.monitoring.functions.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.mongodb.driver.monitoring.addsubscriber.php',
    1 => 'MongoDB\\Driver\\Monitoring\\addSubscriber',
    2 => 'Registers a monitoring event subscriber globally',
  ),
  'up' => 
  array (
    0 => 'ref.monitoring.functions.php',
    1 => 'Функції',
  ),
  'prev' => 
  array (
    0 => 'ref.monitoring.functions.php',
    1 => 'Функції',
  ),
  'next' => 
  array (
    0 => 'function.mongodb.driver.monitoring.removesubscriber.php',
    1 => 'MongoDB\\Driver\\Monitoring\\removeSubscriber',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mongodb/functions/driver/monitoring/addsubscriber.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mongodb.driver.monitoring.addsubscriber" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\Driver\Monitoring\addSubscriber</h1>
  <p class="verinfo">(mongodb &gt;=1.3.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Monitoring\addSubscriber</span> &mdash; <span class="dc-title">Registers a monitoring event subscriber globally</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.mongodb.driver.monitoring.addsubscriber-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>MongoDB\Driver\Monitoring\addSubscriber</strong></span>(<span class="methodparam"><span class="type"><a href="class.mongodb-driver-monitoring-subscriber.php" class="type MongoDB\Driver\Monitoring\Subscriber">MongoDB\Driver\Monitoring\Subscriber</a></span> <code class="parameter">$subscriber</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Registers a monitoring event subscriber globally. The subscriber will be
   notified of all events in the extension for any Manager.
  </p>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <span class="simpara">
    If <code class="parameter">subscriber</code> is already registered globally, this
    function is a no-op. If <code class="parameter">subscriber</code> is also registered
    with one or more Managers, it will still only be notified once of each event
    for each Manager.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mongodb.driver.monitoring.addsubscriber-parameters">
  <h3 class="title">Параметри</h3>
  <dl>
   
    <dt><code class="parameter">subscriber</code> (<span class="type"><a href="class.mongodb-driver-monitoring-subscriber.php" class="type MongoDB\Driver\Monitoring\Subscriber">MongoDB\Driver\Monitoring\Subscriber</a></span>)</dt>
    <dd>
     <p class="para">
      A monitoring event subscriber to register globally.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mongodb.driver.monitoring.addsubscriber-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Не повертає значень.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.mongodb.driver.monitoring.addsubscriber-errors">
  <h3 class="title">Помилки/виключення</h3>
  <ul class="simplelist">
   <li>У разі помилки обробки параметрів
викидається
<span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.php" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span>.</li>
  </ul>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mongodb.driver.monitoring.addsubscriber-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.mongodb.driver.monitoring.removesubscriber.php" class="function" rel="rdfs-seeAlso">MongoDB\Driver\Monitoring\removeSubscriber()</a> - Unregisters a monitoring event subscriber globally</span></li>
   <li><span class="interfacename"><a href="class.mongodb-driver-monitoring-subscriber.php" class="interfacename">MongoDB\Driver\Monitoring\Subscriber</a></span></li>
   <li><span class="interfacename"><a href="class.mongodb-driver-monitoring-commandsubscriber.php" class="interfacename">MongoDB\Driver\Monitoring\CommandSubscriber</a></span></li>
   <li><span class="function"><a href="mongodb-driver-manager.addsubscriber.php" class="function" rel="rdfs-seeAlso">MongoDB\Driver\Manager::addSubscriber()</a> - Registers a monitoring event subscriber with this Manager</span></li>
   <li><a href="mongodb.tutorial.apm.php" class="xref">Application Performance Monitoring (APM)</a></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>