Answer the question
In order to leave comments, you need to log in
Where to find the absence of a class?
Caught a mistake
ReflectionException
Class common\bootstrap\SetUp does not exist
/sites/test/html/vendor/yiisoft/yii2/di/Container.php
namespace common\bootstrap;
use Yii;
use yii\mail\MailerInterface;
use yii\base\BootstrapInterface;
use shop\services\ContactService;
use shop\services\auth\PasswordResetService;
class SetUp implements BootstrapInterface
{
public function bootstrap($app)
{
$container = Yii::$container;
$container->setSingleton(PasswordResetService::class);
$container->setSingleton(MailerInterface::class, function () use ($app){
return $app->mailer;
});
$container->setSingleton(ContactService::class, [], [
$app->params['adminEmail']
]);
}
}
'bootstrap' => [
'log',
'common\bootstrap\SetUp',
'backend\bootstrap\SetUp',
],
'bootstrap' => [
'log',
'common\bootstrap\SetUp',
'frontend\bootstrap\SetUp',
],
'bootstrap' => [
'queue',
'common\bootstrap\SetUp',
],
Answer the question
In order to leave comments, you need to log in
if you are an official participant of Eliseev's webiars, you can personally find out from him))))
Come in. To him on github and there he has classes according to the corresponding namespaces
'common\bootstrap\SetUp',
'frontend\bootstrap\SetUp
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question