Get image url from model good practice? |
it was never intended to (ab)use Data Objects to load Views
you should pass your prepared data array from a model to a controller and in your controller load the view - as described by many many users here if you want to follow my approach it is a bad practice to load views in a data Object like you do in your Proprietati_Object The purpose of a data object is to clean up your models and let the objects do all the work which are related to the Objects Data a simple example would be: if your database contains 2 columns discount and price and you want the calculated price - than your object can do the work PHP Code: class Proprietati_Object and i don't quite get your adaption of the autoloader function PHP Code: public function autoloadCoreObjects($class) this does the same as my posted function except the fact that you use for some weird reason explode to split the name in 2 partials. |
Welcome Guest, Not a member yet? Register Sign In |