using new Object(); |
[eluser]Sherz[/eluser]
Is is possible to do this in CI: Code: $user = new User(); Where the user model would look something like this: Code: class User extends Model
[eluser]bretticus[/eluser]
Certainly, with an include statement or an autoload function in scope. The question is, why would you want to? $this->load->model() has many advantages ( easy extension of core classes, faster "include_once" logic, accessibility, etc.)
[eluser]Sherz[/eluser]
I want to be able to make an instance of a class, modify it then use functions on it. Like this: Code: $user = new User(); What would be the better way of doing something similar to this with CI?
[eluser]pistolPete[/eluser]
I would use an ORM, have a look at e.g. http://codeigniter.com/wiki/ORM/ or search the Ignited Code forum.
[eluser]cahva[/eluser]
Yes.. With Datamapper ORM(seems to be down atm of writing this) you would delete user like this(this is one way): Code: $user = new User(); |
Welcome Guest, Not a member yet? Register Sign In |