• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
organizing private functions

I have books, authors, sellers controllers. In controllers I have some private functions like
_setBookByAuthor($a) {

The function calls a common model function, and some helper functions for text manipulations and sets appropriate output in an array.

Incidentally this function became a bit generic and could be used from all controllers.

Is there a way of defining these kind of functions once so maintenance becomes easier?


[eluser]Derek Allard[/eluser]
Welcome to CI Insteps!

You'd probably want to build a custom library for this.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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