Welcome Guest, Not a member yet? Register   Sign In
In what step is object created in codeigniter ?
#1

[eluser]Pokhara[/eluser]
In what phase does the object creation happen at CI ?

Code:
$newObj = new SomeClass();

In which stage this happens ?
#2

[eluser]WanWizard[/eluser]
Which object?
#3

[eluser]Pokhara[/eluser]
I mean whenever we create new controller or method. We just pass it to view via controller, but when does the object initialization happens ?
#4

[eluser]danmontgomery[/eluser]
If you're talking about the controller object, it's instantiated in system/codeigniter/CodeIgniter.php:

Code:
$CI = new $class();

If you're talking about classes you load, they're instantiated when you call $this->load->model('model_name'), $this->load->library('library_name'), etc
#5

[eluser]Pokhara[/eluser]
thanks noctrum, got it.




Theme © iAndrew 2016 - Forum software by © MyBB