Michel Pelletier wrote:
The reason why we didn't roll it in is that we didn't want Yet Another Hook adding a per-traveral cost, and we could impliment SiteObjects without them. Whether or not we can impliment all your other features without is another question. What feature of SiteAccess uses the before hook? We were able to emulate the virtualhosting behavior with code silimar to yours (I stole some of yours actually) without havign to define the before hook.
It's a wafer-thin cost, really! :-) I'll be interested to see your implementation. Both SiteRoots and Access Rules depend abjectly on the hook. SiteRoots hook into their containers' traversal so that they can call REQUEST.setURL. Designating an object as an Access Rule causes it to be called before its container is entered, which allows the path foolery necessary for (my version of) virtual hosting. When I was first designing SiteAccess, I considered hooking __bobo_traverse__, but I was really worried about what to do if a container already implemented it, or if a SiteRoot and an Access Rule wanted to share the same container. It would be great if __bobo worked like __before, but I imagine that it's a bit late to be changing that one. I have been struggling with the new absolute_url implementation, by the way. It makes perfect sense, and would work fine with a virtual hosting solution which can insert an object into the acquisition chain. Sadly, mine can't. Cheers, Evan @ 4-am