• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create 'alias' for library function

I used to code very, very badly, once upon a time (I hope it's behind me now), and did some sql work (mysql_query etc) in a helper.
Now, I want to make that helper a library : easy. But the functions in this helper are called many times... Do I have to reread all my application and replace 'sqlfunction()' by '$this->sql_lib->sqlfunction()', or can I create sort of an alias for $this->sql_lib->sqlfunction(), which would be called when I write sqlfunction() ?
Thank you in advance !

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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