![]() |
Replace Function in Library - 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: Replace Function in Library (/showthread.php?tid=19191) |
Replace Function in Library - El Forum - 05-30-2009 [eluser]Dregond Rahl[/eluser] I want to know if its possible to replace a function in the file upload library say i want to change the is_image() function to a custom one, but i don't want to modify the the file directly i want to do it in my application. How would i do it ? Replace Function in Library - El Forum - 05-30-2009 [eluser]depthcharge[/eluser] extend the upload class Take a look at the Extending Native Libraries section of the userguide. You then extend the original library and can replace functions/methods with your own, without touching the original library file An Example of extending the upload class. Replace Function in Library - El Forum - 05-30-2009 [eluser]Dregond Rahl[/eluser] Thank you ^^ |