Welcome Guest, Not a member yet? Register   Sign In
model names
#1

[eluser]zilverdistel[/eluser]
I noticed during development that when loading a model, e.g.
Code:
class Gebruiker extends Model
, it doesn't matter if I use
Code:
$this->load->model('Gebruiker');
or
Code:
$this->load->model('gebruiker');
.

I like that, but I don't find any specific information about this in the manual. What I'd like to know is if I can keep on using lower-case, or if this should be considered a 'bug'. In the latter case, I'd prefer not to further exploit this 'feature'.
#2

[eluser]wiredesignz[/eluser]
It's not a bug, all filenames except CI libraries should be lowercase, while the Class names and CI library filenames are ucfirst.

The name you type is converted to lowercase and then the loader checks for this and also for the ucfirst version of it.

Hope this helps.
#3

[eluser]xwero[/eluser]
The load model method looks for the file with the name you defined in the first argument. You can use the capital first letter but it gets transformed to lowercase letters. So you can use it any way you want.
#4

[eluser]zilverdistel[/eluser]
ok, i get it. Thanx.




Theme © iAndrew 2016 - Forum software by © MyBB