From 8f88693600edebb522b6d078691e72a0dcbdb287 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 4 Jul 2008 20:00:59 +0000 Subject: Depend on zope.component Use an adapter to perform traversal. --- repoze/bfg/interfaces.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 711ea44cc..b6d7ff623 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -4,7 +4,14 @@ class IWSGIApplication(Interface): def __call__(environ, start_response): """ Represent a WSGI (PEP 333) application """ -class IPolicy(Interface): - def __call__(root, environ): +class ITraversalPolicy(Interface): + def __call__(environ, root): """ Return a tuple in the form (context, name, subpath) """ +class ITraverser(Interface): + def __init__(context): + """ Accept a context """ + + def __call__(environ, name): + """ Return a subcontext or based on name """ + -- cgit v1.2.3