namespace vendor;
class TestDoc {
public function testit() {
return 'working....';
}
}
use the name space to call the class.
namespace app\controllers;
use yii\web\Controller;
use vendor\TestDoc;
class TestController extends Controller {
public function actionIndex() {
$testDocObj = new TestDoc();
echo $testDocObj->testit();
}
}