php - using of model into controller in a simple mvc -


i use this mvc. want know how can use of data of model controller ?

here line of code:

$registry->db = db::getinstance(); 

but above code not working on controller, can use db::getinstance(); in controller directly. can not use $registry->db instead of it. why ?

finally, how can use of model controller ?

all properties $registry set private, you'll have store somewhere else:

$db = db::getinstance(); 

Comments