[Zope3-checkins] CVS: Zope3/src/zope/app/zapi - __init__.py:1.2
interfaces.py:1.2
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sun Mar 21 12:09:43 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/zapi
In directory cvs.zope.org:/tmp/cvs-serv18582/src/zope/app/zapi
Modified Files:
__init__.py interfaces.py
Log Message:
Added queryType into ZAPI.
=== Zope3/src/zope/app/zapi/__init__.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/zapi/__init__.py:1.1 Mon Mar 15 07:03:45 2004
+++ Zope3/src/zope/app/zapi/__init__.py Sun Mar 21 12:09:43 2004
@@ -21,6 +21,7 @@
from interfaces import IZAPI
from zope.interface import moduleProvides
from zope.app import servicenames
+from zope.app.interface import queryType
moduleProvides(IZAPI)
__all__ = tuple(IZAPI)
=== Zope3/src/zope/app/zapi/interfaces.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/zapi/interfaces.py:1.1 Mon Mar 15 07:03:45 2004
+++ Zope3/src/zope/app/zapi/interfaces.py Sun Mar 21 12:09:43 2004
@@ -58,4 +58,13 @@
"""
+ def queryType(object, type):
+ """Returns the interface implemented by object that provides type.
+
+ For example, if you have an Image, you often would like to know
+ which interface is recognized as a Content Type interface
+ (IContentType). So you would call queryType(myImage, IContentType)
+ which would return IImage.
+ """
+
servicenames = Attribute("Service Names")
More information about the Zope3-Checkins
mailing list