Re: MapToStorageHandler and custom config
Fred Moyer wrote:[color=blue]
> On Fri, 27 Oct 2006, John ORourke wrote:
>> Hi folks,
>> I've implemented some custom config directives, works fine.
>> However, when my MapToStorage handler asks for the per_dir_config
>> hash, it seems to be getting the server config - all other handlers
>> get the per-dir no problem.[/color]
> My guess is that you cannot access MapToStorage because at this phase
> the request has not yet been associated with a particular filename or
> directory .
Note that MapStorageToHandler does this association, so hook ordering plays
a huge role. It's critical that if you plan to morph the entity you do so
BEFORE the core directory_walk occurs, if you are inspecting it that should
happen AFTER to core directory_walk.
It's pretty simple; you shouldn't be modifying resources after they are vetted
That's why translations occur in the TranslateName hook. MapToStorage really
should only be used to identify the URL to a resource, and if you are overriding
the default, then a resource not in the filesystem.