Post by fabioDexus » Wed May 18, 2011 10:44 am

I was browsing to opencart and thought that maybe it could use an autoload hierarchy, if all files obey some rules like:
ControllerName
We could write an autoload function and search the files.
Suppose that you have the checkout/cart and you load it now as something like $this->load->model('checkout/cart');
You could load it simply by calling new CheckoutCart()
And another concept that i guess would be interesting was a flexible hierarchy.

But suppose that you want it to load your custom cart that do something different so the autoload would search for
/yourFolder/checkout/cart.php first and then in catalog/checkout/cart.php if that wasn't found.
I don't know if it would run a little away from the simplicity proposal that is openCart but maybe would add a little more flexibility.

New member

Posts

Joined
Fri May 13, 2011 5:53 am
Who is online

Users browsing this forum: Baidu [Spider] and 8 guests