move default binding

This commit is contained in:
Yuri Kuznetsov
2022-10-16 11:33:32 +03:00
parent c36c5a9d63
commit 838d0b08db
2 changed files with 12 additions and 4 deletions
@@ -27,11 +27,18 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\Binding;
namespace Espo;
use Espo\Core\Authentication\Jwt\SignatureVerifierFactory;
use Espo\Core\Binding\Binder;
use Espo\Core\Binding\BindingProcessor;
class DefaultBinding implements BindingProcessor
/**
* Default binding for the dependency injection framework. Custom binding should be set up in
* `Espo\Modules\{ModuleName}\Binding` or `Espo\Custom\Binding`.
*
* @link https://docs.espocrm.com/development/di/#binding.
*/
class Binding implements BindingProcessor
{
public function process(Binder $binder): void
{
@@ -30,6 +30,7 @@
namespace Espo\Core\Binding;
use Espo\Core\Utils\Module;
use Espo\Binding;
class EspoBindingLoader implements BindingLoader
{
@@ -46,7 +47,7 @@ class EspoBindingLoader implements BindingLoader
$binder = new Binder($data);
(new DefaultBinding())->process($binder);
(new Binding())->process($binder);
foreach ($this->moduleNameList as $moduleName) {
$this->loadModule($binder, $moduleName);