On 7/21/05, David Zülke <[EMAIL PROTECTED]> wrote:
> Nah... don't like that at all, to be honest. I really, really think the
> instance method is in the wrong place back there. Here's mine:
> 
> getModel((string) $module, (mixed) $model, (array) $arguments = null, (bool)
> $extractArguments = false)
> 
> for example:
> 
> Controller::getModel('Default', array('NavBar', 'getInstance'));
> which would do a
> NavBarModel::getInstance();
> (you usually won't want to pass arguments to getInstance(), it's bad
> practice)
> 
> or
> 
> Controller::getModel('Default', 'Search', array($searchType, $searchTerm),
> true);
> that would call
> new SearchModel($searchType, $searchTerm);

yea, hmm.. or we could do it say like:
Controller::getModel('Default', 'NavBar::getInstance', array('Full',
'CrazyGermans'));


-Mike
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev

Reply via email to