Reputation: 2831
I have read the Symfony documentation and I am still unsure of how to include a class. I want to include a Google Analytics PHP class into Symfony, but not sure on the following:
Cheers
Adam
Upvotes: 4
Views: 1095
Reputation: 3163
Use the app/autoload.php
file to configure your autoload mechanism.
If your class doesn't follow PEAR style conventions or PSR-0 standards then you should plainly require it (as is the case with Swiftmailer in the same file)
If your class follows PEAR conventions then you should use registerPrefixes
method else, if your class follows PSR-0 standard (maybe not the case), you should use the registerNamespaces
method
Upvotes: 6