I mean,
If we control the app, like
$autoloader = new Autoloader;
$autoloader->addNamespace(‘foo\bar’,‘baz’);
Should it be on a class like InitController, or whatever ?
Or, is just keeping it in a file named ‘init.php’ okay ?
Should everything be in a class ?
swader
2
Yes.
Using classes makes it much easier to test and refactor your code, not to mention share it.
See here for what to read to absorb healthy concepts…
2 Likes
system
Closed
3
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.