Browse Source

Mise en place Container

develop
Guillaume 3 years ago
parent
commit
ffab1a57cd
15 changed files with 458 additions and 18 deletions
  1. +39
    -0
      Container/File/FileContainer.php
  2. +39
    -0
      Container/Newsletter/NewsletterContainer.php
  3. +39
    -0
      Container/Reminder/ReminderContainer.php
  4. +48
    -0
      Container/Setting/SiteSettingContainer.php
  5. +39
    -0
      Container/Site/NewsContainer.php
  6. +39
    -0
      Container/Site/PageContainer.php
  7. +39
    -0
      Container/Site/SiteContainer.php
  8. +48
    -0
      Container/Ticket/TicketContainer.php
  9. +39
    -0
      Container/Ticket/TicketMessageContainer.php
  10. +39
    -0
      Container/User/GroupUserContainer.php
  11. +48
    -0
      Container/User/UserContainer.php
  12. +1
    -1
      Factory/File/FileFactory.php
  13. +0
    -8
      Factory/File/FileFactoryInterface.php
  14. +1
    -1
      Factory/Newsletter/NewsletterFactory.php
  15. +0
    -8
      Factory/Newsletter/NewsletterFactoryInterface.php

+ 39
- 0
Container/File/FileContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\File;

use Lc\SovBundle\Factory\File\FileFactory;
use Lc\SovBundle\Repository\File\FileRepositoryQuery;
use Lc\SovBundle\Repository\File\FileStore;

class FileContainer
{
protected FileFactory $factory;
protected FileRepositoryQuery $repositoryQuery;
protected FileStore $store;

public function __construct(
FileFactory $factory,
FileRepositoryQuery $repositoryQuery,
FileStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): FileFactory
{
return $this->factory;
}

public function getRepositoryQuery(): FileRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): FileStore
{
return $this->store;
}
}

+ 39
- 0
Container/Newsletter/NewsletterContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\Newsletter;

use Lc\SovBundle\Factory\Newsletter\NewsletterFactory;
use Lc\SovBundle\Repository\Newsletter\NewsletterRepositoryQuery;
use Lc\SovBundle\Repository\Newsletter\NewsletterStore;

class NewsletterContainer
{
protected NewsletterFactory $factory;
protected NewsletterRepositoryQuery $repositoryQuery;
protected NewsletterStore $store;

public function __construct(
NewsletterFactory $factory,
NewsletterRepositoryQuery $repositoryQuery,
NewsletterStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): NewsletterFactory
{
return $this->factory;
}

public function getRepositoryQuery(): NewsletterRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): NewsletterStore
{
return $this->store;
}
}

+ 39
- 0
Container/Reminder/ReminderContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\Reminder;

use Lc\SovBundle\Factory\Reminder\ReminderFactory;
use Lc\SovBundle\Repository\Reminder\ReminderRepositoryQuery;
use Lc\SovBundle\Repository\Reminder\ReminderStore;

class ReminderContainer
{
protected ReminderFactory $factory;
protected ReminderRepositoryQuery $repositoryQuery;
protected ReminderStore $store;

public function __construct(
ReminderFactory $factory,
ReminderRepositoryQuery $repositoryQuery,
ReminderStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): ReminderFactory
{
return $this->factory;
}

public function getRepositoryQuery(): ReminderRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): ReminderStore
{
return $this->store;
}
}

+ 48
- 0
Container/Setting/SiteSettingContainer.php View File

@@ -0,0 +1,48 @@
<?php

namespace Lc\SovBundle\Container\Setting;

use Lc\SovBundle\Definition\SiteSettingDefinition;
use Lc\SovBundle\Factory\Setting\SiteSettingFactory;
use Lc\SovBundle\Repository\Setting\SiteSettingRepositoryQuery;
use Lc\SovBundle\Repository\Setting\SiteSettingStore;

class SiteSettingContainer
{
protected SiteSettingFactory $factory;
protected SiteSettingDefinition $definition;
protected SiteSettingRepositoryQuery $repositoryQuery;
protected SiteSettingStore $store;

public function __construct(
SiteSettingFactory $factory,
SiteSettingDefinition $definition,
SiteSettingRepositoryQuery $repositoryQuery,
SiteSettingStore $store
) {
$this->factory = $factory;
$this->definition = $definition;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): SiteSettingFactory
{
return $this->factory;
}

public function getDefinition(): SiteSettingDefinition
{
return $this->definition;
}

public function getRepositoryQuery(): SiteSettingRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): SiteSettingStore
{
return $this->store;
}
}

+ 39
- 0
Container/Site/NewsContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\Site;

use Lc\SovBundle\Factory\Site\NewsFactory;
use Lc\SovBundle\Repository\Site\NewsRepositoryQuery;
use Lc\SovBundle\Repository\Site\NewsStore;

class NewsContainer
{
protected NewsFactory $factory;
protected NewsRepositoryQuery $repositoryQuery;
protected NewsStore $store;

public function __construct(
NewsFactory $factory,
NewsRepositoryQuery $repositoryQuery,
NewsStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): NewsFactory
{
return $this->factory;
}

public function getRepositoryQuery(): NewsRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): NewsStore
{
return $this->store;
}
}

+ 39
- 0
Container/Site/PageContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\Site;

use Lc\SovBundle\Factory\Site\PageFactory;
use Lc\SovBundle\Repository\Site\PageRepositoryQuery;
use Lc\SovBundle\Repository\Site\PageStore;

class PageContainer
{
protected PageFactory $factory;
protected PageRepositoryQuery $repositoryQuery;
protected PageStore $store;

public function __construct(
PageFactory $factory,
PageRepositoryQuery $repositoryQuery,
PageStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): PageFactory
{
return $this->factory;
}

public function getRepositoryQuery(): PageRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): PageStore
{
return $this->store;
}
}

+ 39
- 0
Container/Site/SiteContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\Site;

use Lc\SovBundle\Factory\Site\SiteFactory;
use Lc\SovBundle\Repository\Site\SiteRepositoryQuery;
use Lc\SovBundle\Repository\Site\SiteStore;

class SiteContainer
{
protected SiteFactory $factory;
protected SiteRepositoryQuery $repositoryQuery;
protected SiteStore $store;

public function __construct(
SiteFactory $factory,
SiteRepositoryQuery $repositoryQuery,
SiteStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): SiteFactory
{
return $this->factory;
}

public function getRepositoryQuery(): SiteRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): SiteStore
{
return $this->store;
}
}

+ 48
- 0
Container/Ticket/TicketContainer.php View File

@@ -0,0 +1,48 @@
<?php

namespace Lc\SovBundle\Container\Ticket;

use Lc\SovBundle\Builder\Ticket\TicketBuilder;
use Lc\SovBundle\Factory\Ticket\TicketFactory;
use Lc\SovBundle\Repository\Ticket\TicketRepositoryQuery;
use Lc\SovBundle\Repository\Ticket\TicketStore;

class TicketContainer
{
protected TicketFactory $factory;
protected TicketBuilder $builder;
protected TicketRepositoryQuery $repositoryQuery;
protected TicketStore $store;

public function __construct(
TicketFactory $factory,
TicketBuilder $builder,
TicketRepositoryQuery $repositoryQuery,
TicketStore $store
) {
$this->factory = $factory;
$this->builder = $builder;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): TicketFactory
{
return $this->factory;
}

public function getBuilder(): TicketBuilder
{
return $this->builder;
}

public function getRepositoryQuery(): TicketRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): TicketStore
{
return $this->store;
}
}

+ 39
- 0
Container/Ticket/TicketMessageContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\Ticket;

use Lc\SovBundle\Factory\Ticket\TicketMessageFactory;
use Lc\SovBundle\Repository\Ticket\TicketMessageRepositoryQuery;
use Lc\SovBundle\Repository\Ticket\TicketMessageStore;

class TicketMessageContainer
{
protected TicketMessageFactory $factory;
protected TicketMessageRepositoryQuery $repositoryQuery;
protected TicketMessageStore $store;

public function __construct(
TicketMessageFactory $factory,
TicketMessageRepositoryQuery $repositoryQuery,
TicketMessageStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): TicketMessageFactory
{
return $this->factory;
}

public function getRepositoryQuery(): TicketMessageRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): TicketMessageStore
{
return $this->store;
}
}

+ 39
- 0
Container/User/GroupUserContainer.php View File

@@ -0,0 +1,39 @@
<?php

namespace Lc\SovBundle\Container\User;

use Lc\SovBundle\Factory\User\GroupUserFactory;
use Lc\SovBundle\Repository\User\GroupUserRepositoryQuery;
use Lc\SovBundle\Repository\User\GroupUserStore;

class GroupUserContainer
{
protected GroupUserFactory $factory;
protected GroupUserRepositoryQuery $repositoryQuery;
protected GroupUserStore $store;

public function __construct(
GroupUserFactory $factory,
GroupUserRepositoryQuery $repositoryQuery,
GroupUserStore $store
) {
$this->factory = $factory;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): GroupUserFactory
{
return $this->factory;
}

public function getRepositoryQuery(): GroupUserRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): GroupUserStore
{
return $this->store;
}
}

+ 48
- 0
Container/User/UserContainer.php View File

@@ -0,0 +1,48 @@
<?php

namespace Lc\SovBundle\Container\User;

use Lc\SovBundle\Builder\User\UserBuilder;
use Lc\SovBundle\Factory\User\UserFactory;
use Lc\SovBundle\Repository\User\UserRepositoryQuery;
use Lc\SovBundle\Repository\User\UserStore;

class UserContainer
{
protected UserFactory $factory;
protected UserBuilder $builder;
protected UserRepositoryQuery $repositoryQuery;
protected UserStore $store;

public function __construct(
UserFactory $factory,
UserBuilder $builder,
UserRepositoryQuery $repositoryQuery,
UserStore $store
) {
$this->factory = $factory;
$this->builder = $builder;
$this->repositoryQuery = $repositoryQuery;
$this->store = $store;
}

public function getFactory(): UserFactory
{
return $this->factory;
}

public function getBuilder(): UserBuilder
{
return $this->builder;
}

public function getRepositoryQuery(): UserRepositoryQuery
{
return $this->repositoryQuery;
}

public function getStore(): UserStore
{
return $this->store;
}
}

+ 1
- 1
Factory/File/FileFactory.php View File

@@ -6,7 +6,7 @@ use App\Entity\File\File;
use Lc\SovBundle\Factory\AbstractFactory;
use Lc\SovBundle\Model\File\FileInterface;

class FileFactory extends AbstractFactory implements FileFactoryInterface
class FileFactory extends AbstractFactory
{
public function create(): FileInterface
{

+ 0
- 8
Factory/File/FileFactoryInterface.php View File

@@ -1,8 +0,0 @@
<?php

namespace Lc\SovBundle\Factory\File;

interface FileFactoryInterface
{

}

+ 1
- 1
Factory/Newsletter/NewsletterFactory.php View File

@@ -6,7 +6,7 @@ use App\Entity\Newsletter\Newsletter;
use Lc\SovBundle\Factory\AbstractFactory;
use Lc\SovBundle\Model\Newsletter\NewsletterInterface;

class NewsletterFactory extends AbstractFactory implements NewsletterFactoryInterface
class NewsletterFactory extends AbstractFactory
{
public function create(): NewsletterInterface
{

+ 0
- 8
Factory/Newsletter/NewsletterFactoryInterface.php View File

@@ -1,8 +0,0 @@
<?php

namespace Lc\SovBundle\Factory\Newsletter;

interface NewsletterFactoryInterface
{

}

Loading…
Cancel
Save