diff options
| author | Chris McDonough <chrism@plope.com> | 2011-01-18 12:27:56 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-01-18 12:27:56 -0500 |
| commit | 8b4146009da0b612e8e001e68cd5f6f63d361c53 (patch) | |
| tree | 5de4e743b2c007c0d5202db7be883d21cfe2bc88 /docs/zcml/subscriber.rst | |
| parent | 566004501e8a28c0ba8f8c882ca5ea0742e5d285 (diff) | |
| parent | c9c3c487bcaedeca97bb6463a00188b0dc01203a (diff) | |
| download | pyramid-8b4146009da0b612e8e001e68cd5f6f63d361c53.tar.gz pyramid-8b4146009da0b612e8e001e68cd5f6f63d361c53.tar.bz2 pyramid-8b4146009da0b612e8e001e68cd5f6f63d361c53.zip | |
Merge branch 'zcmlless'
Diffstat (limited to 'docs/zcml/subscriber.rst')
| -rw-r--r-- | docs/zcml/subscriber.rst | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/docs/zcml/subscriber.rst b/docs/zcml/subscriber.rst deleted file mode 100644 index 25c4abf2e..000000000 --- a/docs/zcml/subscriber.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. _subscriber_directive: - -``subscriber`` --------------- - -The ``subscriber`` ZCML directive configures an :term:`subscriber` -callable to listen for events broadcast by the :app:`Pyramid` web -framework. - -Attributes -~~~~~~~~~~ - -``for`` - The class or :term:`interface` that you are subscribing the listener for, - e.g. :class:`pyramid.events.NewRequest`. Registering a subscriber for a - specific class or interface limits the event types that the subscriber - will receive to those specified by the interface or class. Default: - ``zope.interface.Interface`` (implying *any* event type). - -``handler`` - A :term:`dotted Python name` which references an event handler - callable. The callable should accept a single argument: ``event``. - The return value of the callable is ignored. - -Examples -~~~~~~~~ - -.. code-block:: xml - :linenos: - - <subscriber - for="pyramid.events.NewRequest" - handler=".subscribers.handle_new_request" - /> - -Alternatives -~~~~~~~~~~~~ - -You can also register an event listener by using the -:meth:`pyramid.config.Configurator.add_subscriber` method. - -See Also -~~~~~~~~ - -See also :ref:`events_chapter`. |
