Symfony uses the classloader class in its autoloader.. I have seen tutorials that use the UniversalClassLoader instead of the classLoader class. For instance this adding external libraries requires the Universal class loader ..
$loader = require __DIR__.'/../vendor/autoload.php';
This line gets a classLoader class. How can I use a UniversalclassLoader in this case?
In
Symfony2.0Symfony uses there own ClassLoader Component. You can find the documentation about how to use this class on the link I just gave.However, this class is initialized in the
app/autoload.phpfile, which is not the file you referred to.Symfony2.1uses composer to handle the dependencies. Composer automatically add a classloader to easily autoload load all dependencies. This class is initialized in thevendor/autoload.phpfile, which you refer to. The documentation about this classloader can be found at the composer documentation.