mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
367 B
367 B
Yii2 class loader
Yii 2 class loader is PSR-4 compliant. That means it can handle most of the PHP libraries and frameworks out there.
In order to autoload a library you need to set a root alias for it.
PEAR-style libraries
\Yii::setAlias('@Twig', '@app/vendors/Twig');
References
- BaseYii::autoload