|
- <?php
-
- namespace Lc\CaracoleBundle\Container\Address;
-
- use App\Entity\Address\Address;
- use Lc\CaracoleBundle\Builder\Address\AddressBuilder;
- use Lc\CaracoleBundle\Factory\Address\AddressFactory;
- use Lc\CaracoleBundle\Repository\Address\AddressRepositoryQuery;
- use Lc\CaracoleBundle\Repository\Address\AddressStore;
- use Lc\CaracoleBundle\Solver\Address\AddressSolver;
-
- class AddressContainer
- {
- protected AddressFactory $factory;
- protected AddressSolver $solver;
- protected AddressRepositoryQuery $repositoryQuery;
- protected AddressStore $store;
- protected AddressBuilder $builder;
-
- public function __construct(
- AddressFactory $factory,
- AddressSolver $solver,
- AddressRepositoryQuery $repositoryQuery,
- AddressStore $store,
- AddressBuilder $builder
- ) {
- $this->factory = $factory;
- $this->solver = $solver;
- $this->repositoryQuery = $repositoryQuery;
- $this->store = $store;
- $this->builder = $builder;
- }
-
- public static function getEntityFqcn()
- {
- return Address::class;
- }
-
- public function getFactory(): AddressFactory
- {
- return $this->factory;
- }
-
- public function getSolver(): AddressSolver
- {
- return $this->solver;
- }
-
- public function getRepositoryQuery(): AddressRepositoryQuery
- {
- return $this->repositoryQuery;
- }
-
- public function getStore(): AddressStore
- {
- $this->store->resetContext();
-
- return $this->store;
- }
-
- public function getBuilder(): AddressBuilder
- {
- return $this->builder;
- }
- }
|