src/Services/EntityServiceFactory.php
protected function buildEntityService(string $modelClass): IEntityService
    {
        try {
            if (isset($this->registeredServices[$modelClass])) {
                return $this->container->make($this->registeredServices[$modelClass]);
            }

            return $this->container->make(EntityService::class, [
                'className' => $modelClass,
                'repository' => $this->repositoryFactory->getRepository($modelClass),
            ]);
        } catch (RepositoryException $exception) {
            throw new EntityServiceException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
protected function buildEntityService(string $modelClass): IEntityService
    {
        try {
            if (isset($this->registeredServices[$modelClass])) {
                return $this->container->make($this->registeredServices[$modelClass]);
            }

            return $this->container->make(EntityService::class, [
                'className' => $modelClass,
                'repository' => $this->repositoryFactory->getRepository($modelClass),
            ]);
        } catch (RepositoryException $exception) {
            throw new EntityServiceException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
protected function buildEntityService ( string $ modelClass ) : IEntityService { try { if ( isset ( $ this -> registeredServices [ $ modelClass ] ) ) { return $ this -> container -> make ( $ this -> registeredServices [ $ modelClass ] ) ; } return $ this -> container -> make ( EntityService :: class , [ 'className' => $ modelClass , 'repository' => $ this -> repositoryFactory -> getRepository ( $ modelClass ) , ] ) ; } catch ( RepositoryException $ exception ) { throw new EntityServiceException ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) , $ exception ) ; } }
Build entity service by model class from registered instances or creates default.

@param string $modelClass Model class to build entity service

@return IEntityService

@throws EntityServiceException
@throws BindingResolutionException
Build entity service by model class from registered instances or creates default .