Question about Models and Libraries |
[eluser]gedev2006[/eluser]
Hi The model and library loader is quite annoying really. Lets say i have a model, called "customers". It may look like this: Code: Class Customers extends Model { as you can see what i want to do is return an array of "customer" objects. Where the customer class is a custom class maybe like this: Code: class Customer { now the only way i can see to do this is to have the Customer class underneith or above the model in the same file. I did think about creating it as a library, but thince $this->load->library ( 'customer', array ( $customer ) ); would not return the object of the Library, i cannot create the $_customer array. Any ideas?
[eluser]Jeffrey Lasut[/eluser]
If I were you I would take a look at DMZ/datamapper: http://ellislab.com/forums/viewthread/112904/ |
Welcome Guest, Not a member yet? Register Sign In |