Search code examples
phpamazon-s3symfony1

Can I include a non-Symfony class?


I'm actually learning Symfony and I don't understand the fact of including classes. Can I include a standalone class - this means, not designed for a framework - and then use it - let's say, Amazon S3 class -?


Solution

  • Just put your class in wherever lib (sub)directory it suits you the best. It will be autoloaded by the framework.

    If you don't want it to be automatically autoloaded than put it somewhere in the lib/vendor directory.

    If your class is reusable than it's the best to put it in a plugin.