Yii2 third-party PHP class

class, php, yii, yii2

Solution

The easy way to do it is just register your class in any namespaces defined by Yii2 and use it in file as `use app\namespace\classname;`

Problem

I want to install a third-party PHP class for my application. How should I do that in Yii2? I could not find anything in the documentation.

Original source