getTaxRateContainer(), $this->getUserUserGroupContainer(), $this->getUserGroupContainer(), $this->getDocumentContainer(), $this->getCreditHistoryContainer(), $this->getProducerPriceRangeContainer(), $this->getUserProducerContainer(), $this->getOrderSatusHistoryContainer(), $this->getPointSaleDistributionContainer(), $this->getProductDistributionContainer(), $this->getProductCategoryContainer(), $this->getProductPointSaleContainer(), $this->getProductOrderContainer(), $this->getProductPriceContainer(), $this->getProductSubscriptionContainer(), $this->getUserContainer(), $this->getSubscriptionContainer(), $this->getProductContainer(), $this->getDistributionContainer(), $this->getProducerContainer(), $this->getOrderContainer(), ]; } public function getUserContainer(): UserContainer { return new UserContainer(); } public function getProducerContainer(): ProducerContainer { return new ProducerContainer(); } public function getProducerPriceRangeContainer(): ProducerPriceRangeContainer { return new ProducerPriceRangeContainer(); } public function getUserProducerContainer(): UserProducerContainer { return new UserProducerContainer(); } public function getCreditHistoryContainer(): CreditHistoryContainer { return new CreditHistoryContainer(); } public function getDocumentContainer(): DocumentContainer { return new DocumentContainer(); } public function getUserGroupContainer(): UserGroupContainer { return new UserGroupContainer(); } public function getUserUserGroupContainer(): UserUserGroupContainer { return new UserUserGroupContainer(); } public function getDistributionContainer(): DistributionContainer { return new DistributionContainer(); } public function getTaxRateContainer(): TaxRateContainer { return new TaxRateContainer(); } public function getOrderContainer(): OrderContainer { return new OrderContainer(); } public function getOrderSatusHistoryContainer(): OrderStatusHistoryContainer { return new OrderStatusHistoryContainer(); } public function getPointSaleContainer(): PointSaleContainer { return new PointSaleContainer(); } public function getProductOrderContainer(): ProductOrderContainer { return new ProductOrderContainer(); } public function getProductContainer(): ProductContainer { return new ProductContainer(); } public function getProductCategoryContainer(): ProductCategoryContainer { return new ProductCategoryContainer(); } public function getProductPointSaleContainer(): ProductPointSaleContainer { return new ProductPointSaleContainer(); } public function getProductPriceContainer(): ProductPriceContainer { return new ProductPriceContainer(); } public function getSubscriptionContainer(): SubscriptionContainer { return new SubscriptionContainer(); } public function getProductSubscriptionContainer(): ProductSubscriptionContainer { return new ProductSubscriptionContainer(); } public function getPointSaleDistributionContainer(): PointSaleDistributionContainer { return new PointSaleDistributionContainer(); } public function getProductDistributionContainer(): ProductDistributionContainer { return new ProductDistributionContainer(); } /* * HiƩrarchie des apps */ public function getContainerLevelHierarchyByService($serviceClass): int { $containersArray = $this->getContainers(); $entityFqcnService = $this->getEntityFqcnByService($serviceClass); foreach($containersArray as $key => $container) { if($container->getEntityFqcn() == $entityFqcnService) { return $key; } } } public function getEntityFqcnByService(string $serviceClass): string { $containersArray = $this->getContainers(); foreach($containersArray as $container) { if(in_array($serviceClass, $container->getServices())) { return $container->getEntityFqcn(); } } throw new ErrorException('Service '.$serviceClass.' introuvable dans le container.'); } }