#668: Allow customization of Action/View/Template/Caching/Validation file lookup
paths and View shortname resolution
-------------------------+--------------------------------------------------
Reporter: david | Owner: david
Type: enhancement | Status: assigned
Priority: low | Milestone: 1.0
Component: _OTHER_ | Version:
Severity: normal | Resolution:
Keywords: | Has_patch: 0
-------------------------+--------------------------------------------------
Description changed by david:
Old description:
> so instead of
> {{{
> $file = AgaviConfig::get('core.module_dir') . '/' . $moduleName .
> '/actions/' . $actionName . 'Action.class.php';
> }}}
> in {{{AgaviController::createActionInstance()}}}
> we expand directives and variables on a string read from, say,
> "paths.action_class", that defaults to something like
> {{{
> %core.module_dir%/${moduleName}/actions/{$actionName}Action.class.php
> }}}
> So you could get rid of the separate folders for view, tpl etc per action
> by having something like
> {{{
> %core.module_dir%/${moduleName}/{$actionName}/Action.class.php
> }}}
> for the action,
> {{{
> %core.module_dir%/${moduleName}/{$actionName}/validate.xml
> }}}
> for the validation xml and so on.
New description:
so instead of
{{{
$file = AgaviConfig::get('core.module_dir') . '/' . $moduleName .
'/actions/' . $actionName . 'Action.class.php';
}}}
in {{{AgaviController::createActionInstance()}}}
we expand directives and variables on a string read from, say,
"modules.modulename.agavi.action.path", that defaults to something like
{{{
%core.module_dir%/${moduleName}/actions/{$actionName}Action.class.php
}}}
So you could get rid of the separate folders for view, tpl etc per action
by having something like
{{{
%core.module_dir%/${moduleName}/{$actionName}/Action.class.php
}}}
for the action,
{{{
%core.module_dir%/${moduleName}/{$actionName}/validate.xml
}}}
for the validation xml and so on.
All of this should be per-module, as otherwise, modules are not really
interchangeable.
Difficult: the Views. They have a scheme like
{{{Default_Sub_MarineSuccessView}}}, which won't work unless
{{{Marine}}} and {{{Success}}} (in this example) are separate. That means
we also need customization of the way a View shortname ({{{Success}}}) and
an Action name are concatenated.
Also, template paths are defined through layouts, and handled in
{{{AgaviTemplateLayer}}} classes, where we can only really adjust
{{{directory}}}, not all targets, since those are defined globally.
--
--
Ticket URL: <http://trac.agavi.bitxtender.net/ticket/668#comment:4>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets