$this Meaning In Codeigniter

[Solved] $this Meaning In Codeigniter | Php Frameworks Codeigniter - Code Explorer | yomemimo.com
Question : $this meaning in codeigniter

Answered by : ankur-prajapati

In terms of codeigniter:
You'll notice that each controller in codeigniter extends the base controller class. Using $this in a controller gives you access to everything which is defined in your controller, as well as what's inherited from the base controller.
Most of the use you'll get out of $this involves calling methods which the base class has loaded for you - $this->load, $this->uri, etc.
If I remember correctly, PHP code in a view is run in the context of the controller, so you'll have access to the controller object with $this from there as well.

Source : | Last Update : Fri, 27 Aug 21

Answers related to $this meaning in codeigniter

Code Explorer Popular Question For Php Frameworks Codeigniter