198 lines
7.6 KiB
HTML
198 lines
7.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html lang="en">
|
|
<head>
|
|
|
|
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
|
|
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
|
|
<link rel="start" href="../../overview-summary.html">
|
|
|
|
<title>EventManager (Doctrine)</title>
|
|
|
|
</head>
|
|
<body id="definition" onload="parent.document.title=document.title;">
|
|
|
|
<div class="header">
|
|
<h1>Doctrine</h1>
|
|
<ul>
|
|
<li><a href="../../overview-summary.html">Overview</a></li>
|
|
<li><a href="../../doctrine/common/package-summary.html">Namespace</a></li>
|
|
<li class="active">Class</li>
|
|
<li><a href="../../doctrine/common/package-tree.html">Tree</a></li>
|
|
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../index-all.html">Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="small_links">
|
|
<a href="../../index.html" target="_top">Frames</a>
|
|
<a href="../../doctrine/common/eventmanager.html" target="_top">No frames</a>
|
|
</div>
|
|
<div class="small_links">
|
|
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
</div>
|
|
<hr>
|
|
|
|
<div class="qualifiedName">Doctrine\Common\EventManager</div>
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 39</div>
|
|
|
|
<h1>Class EventManager</h1>
|
|
|
|
<pre class="tree"><strong>EventManager</strong><br /></pre>
|
|
|
|
<hr>
|
|
|
|
<p class="signature">public class <strong>EventManager</strong></p>
|
|
|
|
<div class="comment" id="overview_description"><p>The EventManager is the central point of Doctrine's event listener system.
|
|
Listeners are registered on the manager and events are dispatched through the
|
|
manager.</p></div>
|
|
|
|
<dl>
|
|
<dt>License:</dt>
|
|
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
|
|
<dt>See Also:</dt>
|
|
<dd><code>www.doctrine-project.org</code></dd>
|
|
<dt>Since:</dt>
|
|
<dd>2.0</dd>
|
|
<dt>Version:</dt>
|
|
<dd>$Revision: 3938 $</dd>
|
|
<dt>Author:</dt>
|
|
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
|
|
<dd>Jonathan Wage <jonwage@gmail.com></dd>
|
|
<dd>Roman Borschel <roman@code-factory.org></dd>
|
|
</dl>
|
|
<hr>
|
|
|
|
<table id="summary_method">
|
|
<tr><th colspan="2">Method Summary</th></tr>
|
|
<tr>
|
|
<td class="type"> void</td>
|
|
<td class="description"><p class="name"><a href="#addEventListener()">addEventListener</a>(string|array events, object listener)</p><p class="description">Adds an event listener that listens on the specified events.</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> void</td>
|
|
<td class="description"><p class="name"><a href="#addEventSubscriber()">addEventSubscriber</a>(Doctrine\Common\EventSubscriber subscriber)</p><p class="description">Adds an EventSubscriber. </p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> boolean</td>
|
|
<td class="description"><p class="name"><a href="#dispatchEvent()">dispatchEvent</a>(string eventName, <a href="../../doctrine/common/eventargs.html">EventArgs</a> eventArgs)</p><p class="description">Dispatches an event to all registered listeners.</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> array</td>
|
|
<td class="description"><p class="name"><a href="#getListeners()">getListeners</a>(string event)</p><p class="description">Gets the listeners of a specific event or all listeners.</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> boolean</td>
|
|
<td class="description"><p class="name"><a href="#hasListeners()">hasListeners</a>(string event)</p><p class="description">Checks whether an event has any registered listeners.</p></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="type"> void</td>
|
|
<td class="description"><p class="name"><a href="#removeEventListener()">removeEventListener</a>(string|array events, object listener)</p><p class="description">Removes an event listener from the specified events.</p></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2 id="detail_method">Method Detail</h2>
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 97</div>
|
|
<h3 id="addEventListener()">addEventListener</h3>
|
|
<code class="signature">public void <strong>addEventListener</strong>(string|array events, object listener)</code>
|
|
<div class="details">
|
|
<p>Adds an event listener that listens on the specified events.</p><dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>events - The event(s) to listen on.</dd>
|
|
<dd>listener - The listener object.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 134</div>
|
|
<h3 id="addEventSubscriber()">addEventSubscriber</h3>
|
|
<code class="signature">public void <strong>addEventSubscriber</strong>(Doctrine\Common\EventSubscriber subscriber)</code>
|
|
<div class="details">
|
|
<p>Adds an EventSubscriber. The subscriber is asked for all the events he is
|
|
interested in and added as a listener for these events.</p><dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>subscriber - The subscriber.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 58</div>
|
|
<h3 id="dispatchEvent()">dispatchEvent</h3>
|
|
<code class="signature">public boolean <strong>dispatchEvent</strong>(string eventName, <a href="../../doctrine/common/eventargs.html">EventArgs</a> eventArgs)</code>
|
|
<div class="details">
|
|
<p>Dispatches an event to all registered listeners.</p><dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>eventName - The name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners.</dd>
|
|
<dd>eventArgs - The event arguments to pass to the event handlers/listeners. If not supplied, the single empty EventArgs instance is used.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 75</div>
|
|
<h3 id="getListeners()">getListeners</h3>
|
|
<code class="signature">public array <strong>getListeners</strong>(string event)</code>
|
|
<div class="details">
|
|
<p>Gets the listeners of a specific event or all listeners.</p><dl>
|
|
<dt>Parameters:</dt>
|
|
<dd>event - The name of the event.</dd>
|
|
<dt>Returns:</dt>
|
|
<dd>The event listeners for the specified event, or all event listeners.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 86</div>
|
|
<h3 id="hasListeners()">hasListeners</h3>
|
|
<code class="signature">public boolean <strong>hasListeners</strong>(string event)</code>
|
|
<div class="details">
|
|
<p>Checks whether an event has any registered listeners.</p><dl>
|
|
<dt>Returns:</dt>
|
|
<dd>TRUE if the specified event has any listeners, FALSE otherwise.</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<div class="location">/Doctrine/Common/EventManager.php at line 115</div>
|
|
<h3 id="removeEventListener()">removeEventListener</h3>
|
|
<code class="signature">public void <strong>removeEventListener</strong>(string|array events, object listener)</code>
|
|
<div class="details">
|
|
<p>Removes an event listener from the specified events.</p></div>
|
|
|
|
<hr>
|
|
|
|
<div class="header">
|
|
<h1>Doctrine</h1>
|
|
<ul>
|
|
<li><a href="../../overview-summary.html">Overview</a></li>
|
|
<li><a href="../../doctrine/common/package-summary.html">Namespace</a></li>
|
|
<li class="active">Class</li>
|
|
<li><a href="../../doctrine/common/package-tree.html">Tree</a></li>
|
|
<li><a href="../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../index-all.html">Index</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="small_links">
|
|
<a href="../../index.html" target="_top">Frames</a>
|
|
<a href="../../doctrine/common/eventmanager.html" target="_top">No frames</a>
|
|
</div>
|
|
<div class="small_links">
|
|
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
|
|
</div>
|
|
<hr>
|
|
|
|
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
|
|
|
|
</body>
|
|
|
|
</html> |