3 ms·
HeavyMetal uses something similar that provides similar functionality, but maintains the explicit declarations to keep your codebase organized as well as direct
by jawngee 17y ago
HeavyMetal uses something similar that provides similar functionality, but maintains the explicit declarations to keep your codebase organized as well as directory portable:
uses('system.app.view');
This includes the View class from the /sys/app/view.php
Alternately, you can also do:
$obj=instance('sys.app.view');
either way the goal is to maintain clarity which php's autoload stuff makes a mess of.
Sorry typing on my iPhone is a bitch.
- wvenable 17y agoI've been doing that since the PHP3 days (before require_once existed, and you had to track repeated requires yourself). Since moving to autoload with PHP5, I don't find any loss of clarity. I'm curious what mess you get from autoloading?