i dont really get the docs for spl_autoload
bool spl_autoload_register ([ callback $autoload_function ] )
from my understanding, it will try to run functions registered when php comes across a class not loaded already. so example,
public function autoload() {
require ('nonLoadedClass.php');
}
spl_autoload_register(autoload);
$x = new nonLoadedClass();
will cause the require to run? so i can also register many autoload functions?
public function autoloadXXX() {...}
public function autoloadYYY() {...}
public function autoloadZZZ() {...}
spl_autoload_register('autoloadXXX');
spl_autoload_register('autoloadYYY');
spl_autoload_register('autoloadZZZ');
in the case of doctrine,
require_once(dirname(__FILE__) . '/lib/vendor/doctrine/Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload'));
an array is passed, so i guess it will try to run the autoload function within the Doctrine class (which was required)?