S
S
Sergey Beloventsev2018-10-05 09:45:13
Yii
Sergey Beloventsev, 2018-10-05 09:45:13

Why does Yii::createObject($user) create the wrong object?

actually like this

$user='common\modules\Main\Entities\User';
var_dump(\Yii::createObject($user));

get
object(common\modules\Company\Services\CompanyService)#181 (1) {
["repository":"common\modules\Company\Services\CompanyService":private]=>
object(common\modules\Company\Repositories\CompanyRepository )#182 (0) { }
}

why? And most importantly, how to calculate where the error can not breakpoints on xdebug do not display the whole picture.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question