[Checkins] SVN: grokcore.component/trunk/src/grokcore/component/interfaces.py Add the other missing methods

Martin Aspeli optilude at gmx.net
Thu May 28 08:47:44 EDT 2009


Log message for revision 100510:
  Add the other missing methods

Changed:
  U   grokcore.component/trunk/src/grokcore/component/interfaces.py

-=-
Modified: grokcore.component/trunk/src/grokcore/component/interfaces.py
===================================================================
--- grokcore.component/trunk/src/grokcore/component/interfaces.py	2009-05-28 12:36:24 UTC (rev 100509)
+++ grokcore.component/trunk/src/grokcore/component/interfaces.py	2009-05-28 12:47:44 UTC (rev 100510)
@@ -112,6 +112,15 @@
         name - the name of the utility
         """
 
+    def global_adapter(factory, adapts=None, provides=None, name=u''):
+        """Register a global adapter.
+
+        factory - the adapter factory, a callable
+        adapts - an interface or list of interfaces adapted
+        provides - the interface provided by the adapter
+        name - the name of the adapter
+        """
+
     def direct():
         """Specify whether the class should be used for the component
         or whether it should be used to instantiate the component.
@@ -137,6 +146,11 @@
         """Describes that a function that's used as an adapter
         implements an interface or a number of interfaces.
         """
+    
+    def provider(*interfaces):
+        """Describes that a function directly provides an interface or a
+        number of interfaces.
+        """
 
 
 class IGrokErrors(Interface):



More information about the Checkins mailing list