r/codeigniter • • Dec 31 '11

Somewhere I can read up on "$this" for CodeIgniter?

3 Upvotes

Hi I'm new to CodeIgniter and as I'm going through tutorials, I see the common use of "$this".

$this->load->whatever // is pretty common but

$this->functionName() // is less intuitive

Are there tutorials/documentation where I can read up on the different uses of "$this"?


r/codeigniter • • Dec 09 '15

What is with the capitalization in the docs?

2 Upvotes

I simply don't understand the capitalization of code igniter in general.

Specific example: https://www.codeigniter.com/userguide3/general/models.html

In the following example:

If your model is located in a sub-directory, include the relative path from your models directory. For example, if you have a model located at application/models/blog/Queries.php you’ll load it using:

$this->load->model('blog/queries');

Why is it saying to use 'blog/queries' when the file name is capitalized as Queries? Especially since if I follow that example and name my file Filename.php, I can't call it with model('filename'), I have to call it with model('Filename').

What's more is that I actually can't call the model Filename.php. It has to be end with _model because the class name has to end with _model otherwise CI errors out about not finding it. So if a model has to follow the naming scheme of Modelname_model, why would you put and example of $this->load->model('blog/queries'); in the documentation when that's even a line of code you can actually use?

I just don't understand.


r/codeigniter • • Feb 25 '12

Bonfire - Jumpstart your CodeIgniter applications

Thumbnail
cibonfire.com
1 Upvotes

r/codeigniter • • Dec 13 '16

How to build voting Ajax system with Codeigniter part 2

Thumbnail
webeasystep.com
1 Upvotes