diff options
| author | Jason Madden <jason+github@nextthought.com> | 2017-01-05 09:01:33 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-05 09:01:33 -0600 |
| commit | 269710ccbef1fc98d047f2480308db8e9be82f35 (patch) | |
| tree | aa0cabcaf05fed128277ffb376448d3be7a18e17 | |
| parent | 7a1d23c270a2e7c637211729f81e5fcc4bfcf1cb (diff) | |
| parent | 295f659dd225e6e5fab443411e26d4af8b4b43e7 (diff) | |
| download | zope-interface-269710ccbef1fc98d047f2480308db8e9be82f35.tar.gz | |
Merge pull request #73 from zopefoundation/issue70
Expose IComponent documentation.
| -rw-r--r-- | docs/adapter.rst | 16 | ||||
| -rw-r--r-- | docs/api.rst | 29 | ||||
| -rw-r--r-- | docs/conf.py | 4 |
3 files changed, 41 insertions, 8 deletions
diff --git a/docs/adapter.rst b/docs/adapter.rst index b1caee3..517ae9b 100644 --- a/docs/adapter.rst +++ b/docs/adapter.rst @@ -1,8 +1,8 @@ .. _adapter-registry: -================ -Adapter Registry -================ +================== + Adapter Registry +================== Adapter registries provide a way to register objects that depend on one or more interface specifications and provide (perhaps indirectly) @@ -642,3 +642,13 @@ To register a handler, simply provide ``None`` as the provided interface: >>> registry.subscribe([IRequire1], None, handler) >>> registry.subscriptions([IRequire1], None) == [handler] True + + +Components +========== + +A :class:`zope.interface.registry.Components` object implements the +:class:`zope.interface.interfaces.IComponents` interface. This +interface uses multiple adapter registries to implement multiple +higher-level concerns (utilities, adapters and handlers), while also +providing event notifications and query capabilities. diff --git a/docs/api.rst b/docs/api.rst index 2ff65a1..4d8385c 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -372,7 +372,7 @@ Consider the following example: >>> classImplementsOnly(C, I1, I2) >>> [i.getName() for i in implementedBy(C)] ['I1', 'I2'] - + Instances of ``C`` provide only ``I1``, ``I2``, and regardless of whatever interfaces instances of ``A`` and ``B`` implement. @@ -447,7 +447,7 @@ Consider the following example: >>> classImplementsOnly(C, I1, I2) >>> [i.getName() for i in implementedBy(C)] ['I1', 'I2'] - + Instances of ``C`` provide only ``I1``, ``I2``, and regardless of whatever interfaces instances of ``A`` and ``B`` implement. @@ -699,7 +699,7 @@ include additional interfaces. For example: >>> int(I2 in providedBy(ob)) 0 >>> directlyProvides(ob, directlyProvidedBy(ob), I2) - + adds ``I2`` to the interfaces directly provided by ``ob``: .. doctest:: @@ -1078,3 +1078,26 @@ Usage +++++ See :ref:`adapter-registry`. + +``zope.interface.registry.Components`` +-------------------------------------- + +API ++++ + +The component registry's API is defined by +``zope.interface.interfaces.IComponents``: + +.. autointerface:: zope.interface.interfaces.IComponents + :members: + :member-order: bysource + + +.. autointerface:: zope.interface.interfaces.IComponentLookup + :members: + :member-order: bysource + + +.. autointerface:: zope.interface.interfaces.IComponentRegistry + :members: + :member-order: bysource diff --git a/docs/conf.py b/docs/conf.py index 05d4eb9..2ba173b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -56,9 +56,9 @@ copyright = '2012, Zope Foundation contributors' # built documents. # # The short X.Y version. -version = '4.0' +version = '4.3' # The full version, including alpha/beta/rc tags. -release = '4.0.1' +release = '4.3.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. |
