[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher - IApplicationRequest.py:1.1.2.1.2.2

Jim Fulton jim@zope.com
Mon, 25 Mar 2002 14:04:09 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher
In directory cvs.zope.org:/tmp/cvs-serv23669

Modified Files:
      Tag: Zope3-publisher-refactor-branch
	IApplicationRequest.py 
Log Message:
Added an attribute to get at environment data.

Also added a more specific (than IEnumerableMapping) __getitem__
method that says where the data comes from.


=== Zope3/lib/python/Zope/Publisher/IApplicationRequest.py 1.1.2.1.2.1 => 1.1.2.1.2.2 ===
 
 from Interface.Common.Mapping import IEnumerableMapping
+from Interface.Attribute import Attribute
 
 class IApplicationRequest(IEnumerableMapping):
     """Features that support application logic
@@ -31,3 +32,17 @@
     def getBodyFile():
         """Return the body of the request as a file
         """
+
+    def __getitem__(key):
+        """Return request data
+
+        The only request data are envirnment variables.
+        """
+
+    environment = Attribute(
+        """Request environment data
+
+        This is a read-only mapping from variable name to value.
+        """)
+
+