index.php
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
Yii::$classMap['LibImage'] = __DIR__ . '/../libs/LibImage.php';
$config = require(__DIR__ . '/../config/web.php');
(new yii\web\Application($config))->run();
call
$img = new \LibImage();