[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - metaConfigure.py:1.1.2.8
Jim Fulton
jim@zope.com
Thu, 3 Jan 2002 18:55:21 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv17727/Zope/ComponentArchitecture
Modified Files:
Tag: Zope-3x-branch
metaConfigure.py
Log Message:
Renames component attribute to "factory" in view and adapter directives
=== Zope3/lib/python/Zope/ComponentArchitecture/metaConfigure.py 1.1.2.7 => 1.1.2.8 ===
from Service import defineService, provideService
-def adapter(component, provides, for_=None):
+def adapter(factory, provides, for_=None):
if for_ is not None: for_ = resolve(for_)
provides = resolve(provides)
return [(
('adapter', for_, provides),
- provideAdapter, (for_, provides, resolve(component))
+ provideAdapter, (for_, provides, resolve(factory))
)]
def utility(component, provides):
@@ -26,25 +26,25 @@
provideUtility,(provides, component)
)]
-def view(component, type, name, for_=None):
+def view(factory, type, name, for_=None):
if for_ is not None: for_ = resolve(for_)
type = resolve(type)
- component = resolve(component)
+ factory = resolve(factory)
return [(
('view', for_, name, type),
- provideView, (for_, name, type, component)
+ provideView, (for_, name, type, factory)
)]
-def defaultView(component, type, name, for_=None):
+def defaultView(factory, type, name, for_=None):
if for_ is not None: for_ = resolve(for_)
type = resolve(type)
- component = resolve(component)
+ factory = resolve(factory)
return [
(('view', for_, name, type),
- provideView, (for_, name, type, component)),
+ provideView, (for_, name, type, factory)),
(('view', for_, '', type),
- provideView, (for_, '', type, component)),
+ provideView, (for_, '', type, factory)),
]
def serviceType(name, interface):