CI case-sensitivity - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: CI case-sensitivity (/showthread.php?tid=14755) |
CI case-sensitivity - El Forum - 01-14-2009 [eluser]Tri Dang[/eluser] Hello everyone, First, I must say that CI is very good for me. I use it now and then for my not-very-small web sites development. Thanks for the great product. I have a concern about case-sensitivity (sorry, English is not my native language) of CI that I think you guys may point me to the right direction. The problem is: -I known that CI use Camel for class names and lower_case for file names. So, if I have a model My_model, I will store it in my_model.php. To use it in my controllers, I can use either: $this->load->model('My_model') or $this->load->model('my_model') (notice the first character 'm'). But after loading, I must use the correct name with case-sensitivity. What is your prefer way of load? Class name or file name? I known that each one may have a prefer way, so I just want to see what is used more. -But there is an exception to the above rule, that is when I load Code: $this->load->library('Form_validation'); Code: $this->load->library('form_validation'); Thanks in advance CI case-sensitivity - El Forum - 01-20-2009 [eluser]Tri Dang[/eluser] I just want to pull this thread up in case someone may give some advice. CI case-sensitivity - El Forum - 01-20-2009 [eluser]xwero[/eluser] I have no problem calling the all lowercase form_validation object. CI case-sensitivity - El Forum - 01-20-2009 [eluser]Tri Dang[/eluser] [quote author="xwero" date="1232458869"]I have no problem calling the all lowercase form_validation object.[/quote] Yes, I don't have any problems calling the lower case version of it either. Only the upper case that causes error. I don't know why I can call using both ways (upper case and lower case) for my created components (for example, my models), but I can't call this library using the upper case? Thank you CI case-sensitivity - El Forum - 01-20-2009 [eluser]xwero[/eluser] sorry i have to keep my eyes open when i read I think for consistency you should call all your objects in lowercase. Maybe CI should enforce this? But you are right it's an inconsistency in the calling of objects. CI case-sensitivity - El Forum - 01-20-2009 [eluser]Tri Dang[/eluser] [quote author="xwero" date="1232466036"] I think for consistency you should call all your objects in lowercase. Maybe CI should enforce this? [/quote] Yes, I totally agree with you on this. At first, I created my own rule to call all models, library etc... using class names (I have a small team of 3 developers including me). That is Upper_lower format. Then I met form_validation . I don't want to change my rule and all my existing code. Anyway, I had to change my rule since then. |