> getModel((string) $module, (string) $model, (array) $options=null)
> 
> $options being an associative array which could affect how we
> propogate the model that we  inspect for some documented keys?
> 
> eg:
> $options['model_args'] = array('sompn' => 43, 'name' => 'Joe', 'arg3' =>
> true);
> $options['extract_args'] = true; // blow the model_args array out to ind
> args
> $options['call_method'] = 'getInstance'; // propogate via getInstance vs.
> new
> 
> etc.. yea?

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);


- David



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

Reply via email to