utility¶
Register a Zope Component Architecture "utility".
Attributes¶
componentThe utility component (cannot be specified if
factoryis specified).factoryA factory that creates a component (cannot be specified if
componentis specified).providesThe interface that an utility instance resulting from a lookup will provide.
nameThe utility name.
Example¶
1<utility
2 provides=".interfaces.IMyUtility"
3 component=".utilities.MyUtility"
4 />
Alternatives¶
Use the registerUtility method of the registry attribute of a
Configurator instance during initial application setup.
See Also¶
None.