autoloader.md 367 Bytes
Newer Older
1 2 3
Yii2 class loader
=================

Qiang Xue committed
4
Yii 2 class loader is PSR-4 compliant. That means it can handle most of the PHP
5 6 7 8 9 10 11 12 13 14 15 16 17 18
libraries and frameworks out there.

In order to autoload a library you need to set a root alias for it.

PEAR-style libraries
--------------------

```php
\Yii::setAlias('@Twig', '@app/vendors/Twig');
```

References
----------

Qiang Xue committed
19
- BaseYii::autoload