vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Event/Repository.php line 31

Open in your IDE?
  1. <?php
  2. /**
  3.  * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4.  * @license For full copyright and license information view LICENSE file distributed with this source code.
  5.  */
  6. declare(strict_types=1);
  7. namespace eZ\Publish\Core\Event;
  8. use eZ\Publish\API\Repository\BookmarkService as BookmarkServiceInterface;
  9. use eZ\Publish\API\Repository\ContentService as ContentServiceInterface;
  10. use eZ\Publish\API\Repository\ContentTypeService as ContentTypeServiceInterface;
  11. use eZ\Publish\API\Repository\FieldTypeService as FieldTypeServiceInterface;
  12. use eZ\Publish\API\Repository\LanguageService as LanguageServiceInterface;
  13. use eZ\Publish\API\Repository\LocationService as LocationServiceInterface;
  14. use eZ\Publish\API\Repository\NotificationService as NotificationServiceInterface;
  15. use eZ\Publish\API\Repository\ObjectStateService as ObjectStateServiceInterface;
  16. use eZ\Publish\API\Repository\PermissionResolver as PermissionResolverInterface;
  17. use eZ\Publish\API\Repository\Repository as RepositoryInterface;
  18. use eZ\Publish\API\Repository\RoleService as RoleServiceInterface;
  19. use eZ\Publish\API\Repository\SearchService as SearchServiceInterface;
  20. use eZ\Publish\API\Repository\SectionService as SectionServiceInterface;
  21. use eZ\Publish\API\Repository\TrashService as TrashServiceInterface;
  22. use eZ\Publish\API\Repository\URLAliasService as URLAliasServiceInterface;
  23. use eZ\Publish\API\Repository\URLService as URLServiceInterface;
  24. use eZ\Publish\API\Repository\URLWildcardService as URLWildcardServiceInterface;
  25. use eZ\Publish\API\Repository\UserPreferenceService as UserPreferenceServiceInterface;
  26. use eZ\Publish\API\Repository\UserService as UserServiceInterface;
  27. final class Repository implements RepositoryInterface
  28. {
  29.     /** @var \eZ\Publish\API\Repository\Repository */
  30.     private $repository;
  31.     /** @var \eZ\Publish\API\Repository\BookmarkService */
  32.     private $bookmarkService;
  33.     /** @var \eZ\Publish\API\Repository\ContentService */
  34.     private $contentService;
  35.     /** @var \eZ\Publish\API\Repository\ContentTypeService */
  36.     private $contentTypeService;
  37.     /** @var \eZ\Publish\API\Repository\FieldTypeService */
  38.     private $fieldTypeService;
  39.     /** @var \eZ\Publish\API\Repository\LanguageService */
  40.     private $languageService;
  41.     /** @var \eZ\Publish\API\Repository\LocationService */
  42.     private $locationService;
  43.     /** @var \eZ\Publish\API\Repository\NotificationService */
  44.     private $notificationService;
  45.     /** @var \eZ\Publish\API\Repository\ObjectStateService */
  46.     private $objectStateService;
  47.     /** @var \eZ\Publish\API\Repository\RoleService */
  48.     private $roleService;
  49.     /** @var \eZ\Publish\API\Repository\SearchService */
  50.     private $searchService;
  51.     /** @var \eZ\Publish\API\Repository\SectionService */
  52.     private $sectionService;
  53.     /** @var \eZ\Publish\API\Repository\TrashService */
  54.     private $trashService;
  55.     /** @var \eZ\Publish\API\Repository\URLAliasService */
  56.     private $urlAliasService;
  57.     /** @var \eZ\Publish\API\Repository\URLService */
  58.     private $urlService;
  59.     /** @var \eZ\Publish\API\Repository\URLWildcardService */
  60.     private $urlWildcardService;
  61.     /** @var \eZ\Publish\API\Repository\UserPreferenceService */
  62.     private $userPreferenceService;
  63.     /** @var \eZ\Publish\API\Repository\UserService */
  64.     private $userService;
  65.     public function __construct(
  66.         RepositoryInterface $repository,
  67.         BookmarkServiceInterface $bookmarkService,
  68.         ContentServiceInterface $contentService,
  69.         ContentTypeServiceInterface $contentTypeService,
  70.         FieldTypeServiceInterface $fieldTypeService,
  71.         LanguageServiceInterface $languageService,
  72.         LocationServiceInterface $locationService,
  73.         NotificationServiceInterface $notificationService,
  74.         ObjectStateServiceInterface $objectStateService,
  75.         RoleServiceInterface $roleService,
  76.         SearchServiceInterface $searchService,
  77.         SectionServiceInterface $sectionService,
  78.         TrashServiceInterface $trashService,
  79.         URLAliasServiceInterface $urlAliasService,
  80.         URLServiceInterface $urlService,
  81.         URLWildcardServiceInterface $urlWildcardService,
  82.         UserPreferenceServiceInterface $userPreferenceService,
  83.         UserServiceInterface $userService
  84.     ) {
  85.         $this->repository $repository;
  86.         $this->bookmarkService $bookmarkService;
  87.         $this->contentService $contentService;
  88.         $this->contentTypeService $contentTypeService;
  89.         $this->fieldTypeService $fieldTypeService;
  90.         $this->languageService $languageService;
  91.         $this->locationService $locationService;
  92.         $this->notificationService $notificationService;
  93.         $this->objectStateService $objectStateService;
  94.         $this->roleService $roleService;
  95.         $this->searchService $searchService;
  96.         $this->sectionService $sectionService;
  97.         $this->trashService $trashService;
  98.         $this->urlAliasService $urlAliasService;
  99.         $this->urlService $urlService;
  100.         $this->urlWildcardService $urlWildcardService;
  101.         $this->userPreferenceService $userPreferenceService;
  102.         $this->userService $userService;
  103.     }
  104.     public function sudo(callable $callback, ?RepositoryInterface $outerRepository null)
  105.     {
  106.         return $this->repository->sudo($callback$outerRepository);
  107.     }
  108.     public function beginTransaction(): void
  109.     {
  110.         $this->repository->beginTransaction();
  111.     }
  112.     public function commit(): void
  113.     {
  114.         $this->repository->commit();
  115.     }
  116.     public function rollback(): void
  117.     {
  118.         $this->repository->rollback();
  119.     }
  120.     public function getPermissionResolver(): PermissionResolverInterface
  121.     {
  122.         return $this->repository->getPermissionResolver();
  123.     }
  124.     public function getBookmarkService(): BookmarkServiceInterface
  125.     {
  126.         return $this->bookmarkService;
  127.     }
  128.     public function getContentService(): ContentServiceInterface
  129.     {
  130.         return $this->contentService;
  131.     }
  132.     public function getContentTypeService(): ContentTypeServiceInterface
  133.     {
  134.         return $this->contentTypeService;
  135.     }
  136.     public function getFieldTypeService(): FieldTypeServiceInterface
  137.     {
  138.         return $this->fieldTypeService;
  139.     }
  140.     public function getContentLanguageService(): LanguageServiceInterface
  141.     {
  142.         return $this->languageService;
  143.     }
  144.     public function getLocationService(): LocationServiceInterface
  145.     {
  146.         return $this->locationService;
  147.     }
  148.     public function getNotificationService(): NotificationServiceInterface
  149.     {
  150.         return $this->notificationService;
  151.     }
  152.     public function getObjectStateService(): ObjectStateServiceInterface
  153.     {
  154.         return $this->objectStateService;
  155.     }
  156.     public function getRoleService(): RoleServiceInterface
  157.     {
  158.         return $this->roleService;
  159.     }
  160.     public function getSearchService(): SearchServiceInterface
  161.     {
  162.         return $this->searchService;
  163.     }
  164.     public function getSectionService(): SectionServiceInterface
  165.     {
  166.         return $this->sectionService;
  167.     }
  168.     public function getTrashService(): TrashServiceInterface
  169.     {
  170.         return $this->trashService;
  171.     }
  172.     public function getURLAliasService(): URLAliasServiceInterface
  173.     {
  174.         return $this->urlAliasService;
  175.     }
  176.     public function getURLService(): URLServiceInterface
  177.     {
  178.         return $this->urlService;
  179.     }
  180.     public function getURLWildcardService(): URLWildcardServiceInterface
  181.     {
  182.         return $this->urlWildcardService;
  183.     }
  184.     public function getUserPreferenceService(): UserPreferenceServiceInterface
  185.     {
  186.         return $this->userPreferenceService;
  187.     }
  188.     public function getUserService(): UserServiceInterface
  189.     {
  190.         return $this->userService;
  191.     }
  192. }