tinymvc-php icon indicating copy to clipboard operation
tinymvc-php copied to clipboard

Loading model from controller construct

Open ckrudelux opened this issue 10 years ago • 0 comments

Looked through your code I noticed calling the controller in two different ways. First in tinymvc_model you do it this way

tmvc::instance()->controller->load->database($poolname);

But in tinymvc_load you do it this way instead

$controller = tmvc::instance(null,'controller');

I think both should be called like the last since the option too name your tmvc instance would be putting this first call into an error since it calls the default labeled instance of tmvc which does not exists. If one would create a default instance first and a named instance after it still breaks cause of the include function in setupController method. Is this something old that was removed or has it just not been completely implemented yet?

ckrudelux avatar Jan 09 '16 05:01 ckrudelux