Skip to content

Commit

Permalink
First cut at adapter-registry refactoring. The refactoring makes
Browse files Browse the repository at this point in the history
adapter lookup work more like method lookup.  This provides:

- a much simpler algorithm,

- a basis for super-like adapter lookup, and

- a fix for a bug in multi-adapter lookup.

These changes also remove the distinction between objects with no
interface declarations and objects that declare that they provide
Interface.

Unfortunately, these version is *much* too slow.  I'm checking this
version in to save it before trying some variations.
  • Loading branch information
Jim Fulton committed Sep 8, 2005
0 parents commit 15dac0b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<configure xmlns="http://namespaces.zope.org/zope">

<content class=".viewpagetemplatefile.BoundPageTemplate">
<allow attributes="__call__ __str__ __name__" />
</content>

<adapter
for="*"
provides="zope.app.traversing.interfaces.IPathAdapter"
factory=".talesapi.ZopeTalesAPI"
name="zope"
/>

<adapter
for="*"
provides="zope.app.traversing.interfaces.IPathAdapter"
factory=".urlquote.URLQuote"
name="url"/>

<content class="zope.tales.tales.Iterator">
<allow interface="zope.tales.interfaces.ITALESIterator" />
</content>

<class class=".engine.ZopePathExpr">
<allow attributes="__call__" />
</class>
<class class=".engine.TrustedZopePathExpr">
<allow attributes="__call__" />
</class>
<class class=".engine.ZopePythonExpr">
<allow attributes="__call__" />
</class>
<class class=".engine.PythonExpr">
<allow attributes="__call__" />
</class>

<class class="zope.tales.expressions.StringExpr">
<allow attributes="__call__" />
</class>
<class class="zope.tales.expressions.NotExpr">
<allow attributes="__call__" />
</class>
<class class="zope.tales.expressions.DeferExpr">
<allow attributes="__call__" />
</class>

<adapter
for="zope.app.pagetemplate.viewpagetemplatefile.BoundPageTemplate
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.publisher.interfaces.browser.IBrowserPublisher"
factory="zope.app.publication.traversers.NoTraverser"
/>

</configure>

0 comments on commit 15dac0b

Please sign in to comment.