• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.