![]() |
Noob Question for Libraries... - 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: Noob Question for Libraries... (/showthread.php?tid=35244) |
Noob Question for Libraries... - El Forum - 10-23-2010 [eluser]altrano[/eluser] Hello, I have some classes that i builded earlier for symfony projects. and the most of the methods inside are static, the question is how or can i use static libraries in CI? like Code: $this->load->library('Example'); Code: $this->example->get('somethings') Thanks Noob Question for Libraries... - El Forum - 10-23-2010 [eluser]stuffradio[/eluser] Can you explain differently? What do you mean? Noob Question for Libraries... - El Forum - 10-23-2010 [eluser]altrano[/eluser] [quote author="stuffradio" date="1287889538"]Can you explain differently? What do you mean?[/quote] simply can i use static calls of methods or not, i don't now how to describe diffently, in symfony many classes or methods in his classes are static Code: class Example then static call this like Code: Example::get(); can i call a method like Code: $this->example::get(); Code: $this->examlpe->get(); public function get() Code: { i hope now you better understand my question, sorry my english very bad to describe better. Noob Question for Libraries... - El Forum - 10-23-2010 [eluser]tonanbarbarian[/eluser] the load->library method will load the library and make an instance of that as an object however you do not have to then use it that way. the file and class are now loaded by php so you can simply do this Code: $this->load->library('Example'); Noob Question for Libraries... - El Forum - 10-23-2010 [eluser]altrano[/eluser] [quote author="tonanbarbarian" date="1287891748"]the load->library method will load the library and make an instance of that as an object however you do not have to then use it that way. the file and class are now loaded by php so you can simply do this Code: $this->load->library('Example'); ok thanks for very fast answers. |