I don't really understand the question either. The issue of const's is
neglegient though. I always prefer to use const's. What are you trying to do
though? Why do you have so many routes? Why not use an xml storage for these
routes, and load everything in one function? For instance, here's a function
I have for loading plugins:
public function setPlugins()
{
$plugins = array();
foreach(Hornet::getConfig('global/controller/front/plugins')->children()
as $module=>$pluginInfo)
{
$plugins[$module] = array();
foreach($pluginInfo->children() as $pluginName=>$plugin)
{
$pluginClassName = uc_words($module);
if($plugin->is('active')){
$pluginClassName .=
'_Controller_Plugin_' . $pluginName;
$this->registerPlugin(new
$pluginClassName,$plugin->get('stackIndex',null));
}
}
}
return $this;
}
And Here's the XML Source:
<controller>
<front>
<plugins>
<Core>
<ViewSetup>
<active>1</active>
<stackIndex>98</stackIndex>
</ViewSetup>
<ActionSetup>
<active>1</active>
</ActionSetup>
</Core>
</plugins>
</front>
</controller>
Michał Minicki wrote:
>
> Mary Nicole Hicks wrote:
>
>> Does anyone have a method of organising all these route names using
>> something like const(s) so that you only specify the string route name in
>> one place?
>
> I don't get it. Where's the benefit in using CONST vs string? Maybe you
> could explain
> what you would like it to be by presenting a use case.
>
> --
> Michał Minicki aka Martel Valgoerad | [EMAIL PROTECTED] |
> http://aie.pl/martel.asc
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> "Idleness is not doing nothing. Idleness is being free to do anything." --
> Floyd Dell
>
>
--
View this message in context:
http://www.nabble.com/Organising-Routes-tp18023190p18052454.html
Sent from the Zend Framework mailing list archive at Nabble.com.