• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where to put plain object classes?

#9
But when the target class is static... What then?

I have another way by using an autoloader, based on the function spl_autoload_register(). Have a look at this project as an example: https://github.com/ivantcholakov/codeigniter-utf8

These classes I place within a separate folder application/classes/. Then, the autoloader may be declared and registered within a 'pre_system' hook: https://github.com/ivantcholakov/codeign...toload.php . This is just a non-standard example, you can tweak and extend the autoloader.

If the third-party class is available as a Composer package - that would be the preferred choice, of course.
Reply


Messages In This Thread
Where to put plain object classes? - by geekita - 12-02-2014, 05:51 AM
RE: Where to put plain object classes? - by ivantcholakov - 12-02-2014, 03:36 PM
RE: Where to put plain object classes? - by Jamie - 01-06-2015, 05:18 AM
RE: Where to put plain object classes? - by Jamie - 01-06-2015, 03:08 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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