External libraries

Where should I place my external libraries classes for them to be autoloaded? Please help am new to Yii

You can add your libs for example like:

  • protected/components/lib

  • protected/vendors/mylib

and add the folder to the import in config/main.php




...

         // autoloading model and component classes

	'import'=>array(

		'application.models.*',

		'application.components.*',

                ...

                //add your components 

                'application.components.lib.*',

                'application.vendors.mylib.*',     

	),

...