UnionOfRAD/lithium — Issue #283: Inconsistency with paths in Media::type vs Media::_handlers
Author: rmarscher
Created: 2012-01-19 20:31:28+00:00
State: open

Hey guys,

This is an rfc on Media::type documentation.

I noticed this inconsistency a long time ago. I think I started on a modification to submit as a pull request but must have never finished it.

If you look at the docs and defaults for Media::type, you'll see it has 'template' and 'layout' as top level items for the $options for defining a new media type. But, if you look at Media::_handlers, the 'default' type has 'template' and 'layout' as well as 'element' inside a 'paths' key.

It seems that these settings get all happily passed along from Media to View and then (in most cases) to the view loader which is the File template adapter. I lose the flow of how the top level 'template' and 'layout' keys get merged with the 'paths' key.

So the question is -- should the documentation and defaults change to include the 'paths' key for the $options param for Media::type and deprecate 'template' and 'layout' as top level items (it could continue to work as is for backwards compatibility, but just not documented)?

Thanks,
Rob