'components' => [
'someService' => ServiceInterface::class
],
\Yii::$app->someService->doSomething();
'container' => [
'definitions' => [
ServiceInterface::class => [
'class' => SomeService::class,
],
],
]
'container' => [
'definitions' => [
ServiceInterface::class => [
'class' => FakeService::class,
'predefinedResponse' => FakeService::RESPONSE_A,
],
],
]
'container' => [
'definitions' => [
ServiceInterface::class => [
'class' => FakeService::class,
'predefinedResponse' => 'something useful',
],
],
]
var conditions = {...},
update = { $inc: { views: 1 }};
# update documents matching condition
Model.update(conditions, update).exec();
use MultilingualTrait;