From 831da8a6969703d79c4efb27a96c734140babf45 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 26 Dec 2009 19:23:29 +0000 Subject: - Created new top-level documentation section: "ZCML Directives". This section contains detailed ZCML directive information, some of which was removed from various narrative chapters. --- docs/narr/events.rst | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'docs/narr/events.rst') diff --git a/docs/narr/events.rst b/docs/narr/events.rst index c257ddb86..b2d2f20b5 100644 --- a/docs/narr/events.rst +++ b/docs/narr/events.rst @@ -65,14 +65,6 @@ registry` by either of the following methods: handler=".subscribers.mysubscriber" /> - The *subscriber* :term:`ZCML directive` takes two attributes: - ``for``, and ``handler``. The value of ``for`` is the interface - the subscriber is registered for. Registering a subscriber for a - specific interface limits the event types that the subscriber will - receive to those specified by the interface. The value of - ``handler`` is a Python dotted-name path to the subscriber - function. - Each of the above examples implies that every time the :mod:`repoze.bfg` framework emits an event object that supplies an :class:`repoze.bfg.interfaces.INewRequest` interface, the @@ -112,7 +104,9 @@ file: handler=".subscribers.handle_new_response" /> -Or imperatively via the +See also :ref:`subscriber_directive`. + +Subscribers may also be configured imperatively via the :meth:`repoze.bfg.configuration.Configurator.add_subscriber` method: .. ignore-next-block -- cgit v1.2.3