• 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extend CI model to allow params to be passed to the constructor?

#1
Is it possible to extend CodeIgniter's model to allow parameters to be passed to the constructor?  I have four models that are almost identical.  If there were a way to pass the table name and the allowed fields array to the model via the constructor, I could eliminate a bunch of code.
Reply


Messages In This Thread
Extend CI model to allow params to be passed to the constructor? - by mlurie - 09-12-2020, 07:40 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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