Reputation: 6269
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?
Upvotes: 0
Views: 1304
Reputation: 41934
In Symfony2.0
Symfony 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.php
file, which is not the file you referred to.
Symfony2.1
uses composer to handle the dependencies. Composer automatically add a classloader to easily autoload load all dependencies. This class is initialized in the vendor/autoload.php
file, which you refer to. The documentation about this classloader can be found at the composer documentation.
Upvotes: 1