![]() |
[CLOSED] Learning Custom Url Function - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [CLOSED] Learning Custom Url Function (/showthread.php?tid=60815) |
[CLOSED] Learning Custom Url Function - El Forum - 07-04-2014 [eluser]riwakawd[/eluser] I am just learning how to make some custom functions and just trial and error at the moment. I would like to be able to make in the url helper another function similar to the site_url but called new $this->url->link(/demo/demo); Code: /** Code: /** [CLOSED] Learning Custom Url Function - El Forum - 07-04-2014 [eluser]joergy[/eluser] Don't understand exactly what Your purpose is.... Normally You write a controller, model, library, view (MVC) and helpers. Helpers are globally available functions, which must be loaded in your MVC, they are not related to any instances. On the other hand, if You really want to extend the core, read http://localhost/CI/general/core_classes.html [CLOSED] Learning Custom Url Function - El Forum - 07-04-2014 [eluser]riwakawd[/eluser] [quote author="joergy" date="1404486204"]Don't understand exactly what Your purpose is.... Normally You write a controller, model, library, view (MVC) and helpers. Helpers are globally available functions, which must be loaded in your MVC, they are not related to any instances. On the other hand, if You really want to extend the core, read http://localhost/CI/general/core_classes.html [/quote] OK. Which codeigniter was more oop than mvc [CLOSED] Learning Custom Url Function - El Forum - 07-05-2014 [eluser]CroNiX[/eluser] Here's an example on how you extend a helper with your own functions, which I believe is the question from your first post: http://ellislab.com/forums/viewthread/245771/#1066946 But you wouldn't access a HELPER with Code: $this->url->link(/demo/demo); Code: link('demo/demo'); Not sure what you want your "link" function to do, but the url helper already does have an anchor() function which might be what you're after. Your last question doesn't make any sense. |