Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Private Attributes | List of all members
eZ\Publish\Core\REST\Client\Repository Class Reference

REST Client Repository. More...

Inheritance diagram for eZ\Publish\Core\REST\Client\Repository:

## Public Member Functions
| __construct (HttpClient $client, Common\Input\Dispatcher $inputDispatcher, Common\Output\Visitor $outputVisitor, Common\RequestParser $requestParser, array $fieldTypes)
| Instantiates the REST Client repository. More...
| getCurrentUser ()
| getCurrentUserReference ()
| setCurrentUser (UserReference $user)
| hasAccess ($module, $function, UserReference $user=null)
| canUser ($module, $function, ValueObject $object, $targets=null)
| getContentService ()
| Get Content Service. More...
| getContentLanguageService ()
| Get Content Language Service. More...
| getContentTypeService ()
| Get Content Type Service. More...
| getLocationService ()
| Get Content Location Service. More...
| getTrashService ()
| Get Content Trash service. More...
| getSectionService ()
| Get Content Section Service. More...
| getSearchService ()
| Get Search Service. More...
| getUserService ()
| Get User Service. More...
| getIOService ()
| Get IO Service. More...
| getRoleService ()
| Get RoleService. More...
| getURLAliasService ()
| Get URLAliasService. More...
| getURLWildcardService ()
| Get URLWildcardService. More...
| getObjectStateService ()
| Get ObjectStateService. More...
| getFieldTypeService ()
| Get FieldTypeService. More...
| getPermissionResolver ()
| Get PermissionResolver. More...
| getURLService ()
| Get URLService. More...
| getBookmarkService ()
| Get BookmarkService. More...
| getUserPreferenceService ()
| Get UserPreferenceService. More...
| getNotificationService ()
| Get NotificationService. More...
| beginTransaction ()
| Begin transaction. More...
| commit ()
| Commit transaction. More...
| rollback ()
| Rollback transaction. More...
| sudo (callable $callback, APIRepository $outerRepository=null)
| {} More...
Public Member Functions inherited from eZ\Publish\API\Repository\Repository
| sudo (callable $callback, Repository $outerRepository=null)
| Allows API execution to be performed with full access, sand-boxed. More...

## Private Attributes
| $sectionService
| $languageService
| $userService
| $roleService
| $urlAliasService
| $contentService
| $contentTypeService
| $trashService
| $locationService
| $objectStateService
| $ioService
| $fieldTypeService
| $client
| $inputDispatcher
| $outputVisitor
| $requestParser
| $fieldTypes

## Detailed Description

REST Client Repository.

See also
  \eZ\Publish\API\Repository\Repository

Definition at line 19 of file Core/REST/Client/Repository.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\REST\Client\Repository::__construct | ( | HttpClient | $client,
|  | Common\Input\Dispatcher | $inputDispatcher,
|  | Common\Output\Visitor | $outputVisitor,
|  | Common\RequestParser | $requestParser,
|  | array | $fieldTypes
| ) |  |

Instantiates the REST Client repository.

Parameters

  \eZ\Publish\Core\REST\Client\HttpClient | $client |
  \eZ\Publish\Core\REST\Common\Input\Dispatcher | $inputDispatcher |
  \eZ\Publish\Core\REST\Common\Output\Visitor | $outputVisitor |
  \eZ\Publish\Core\REST\Common\RequestParser | $requestParser |
  \eZ\Publish\SPI\FieldType\FieldType[] | $fieldTypes |

Definition at line 89 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$client, eZ\Publish\Core\REST\Client\Repository\$fieldTypes, eZ\Publish\Core\REST\Client\Repository\$inputDispatcher, eZ\Publish\Core\REST\Client\Repository\$outputVisitor, and eZ\Publish\Core\REST\Client\Repository\$requestParser.

## Member Function Documentation

## ◆ beginTransaction()

eZ\Publish\Core\REST\Client\Repository::beginTransaction | ( |  | ) |

Begin transaction.

Begins an transaction, make sure you'll call commit or rollback when done, otherwise work will be lost.

Implements eZ\Publish\API\Repository\Repository.

Definition at line 497 of file Core/REST/Client/Repository.php.

## ◆ canUser()

eZ\Publish\Core\REST\Client\Repository::canUser | ( |  | $module,
|  |  | $function,
|  | ValueObject | $object,
|  |  | $targets = `null`
| ) |  |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::canUser() instead.

Indicates if the current user is allowed to perform an action given by the function on the given objects.

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 168 of file Core/REST/Client/Repository.php.

## ◆ commit()

eZ\Publish\Core\REST\Client\Repository::commit | ( |  | ) |

Commit transaction.

Commit transaction, or throw exceptions if no transactions has been started.

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 509 of file Core/REST/Client/Repository.php.

## ◆ getBookmarkService()

eZ\Publish\Core\REST\Client\Repository::getBookmarkService | ( |  | ) |

Get BookmarkService.

Returns
  \eZ\Publish\API\Repository\BookmarkService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 466 of file Core/REST/Client/Repository.php.

## ◆ getContentLanguageService()

eZ\Publish\Core\REST\Client\Repository::getContentLanguageService | ( |  | ) |

Get Content Language Service.

Get service object to perform operations on Content language objects

Returns
  \eZ\Publish\API\Repository\LanguageService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 202 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$languageService, and eZ\Publish\Core\REST\Client\Repository\getContentService().

## ◆ getContentService()

eZ\Publish\Core\REST\Client\Repository::getContentService | ( |  | ) |

Get Content Service.

Get service object to perform operations on Content objects and it's aggregate members.

Returns
  \eZ\Publish\API\Repository\ContentService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 180 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$contentService, and eZ\Publish\Core\REST\Client\Repository\getContentTypeService().

Referenced by eZ\Publish\Core\REST\Client\Repository\getContentLanguageService().

## ◆ getContentTypeService()

eZ\Publish\Core\REST\Client\Repository::getContentTypeService | ( |  | ) |

Get Content Type Service.

Get service object to perform operations on Content Type objects and it's aggregate members. ( Group, Field & FieldCategory )

Returns
  \eZ\Publish\API\Repository\ContentTypeService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 226 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$contentTypeService.

Referenced by eZ\Publish\Core\REST\Client\Repository\getContentService().

## ◆ getCurrentUser()

eZ\Publish\Core\REST\Client\Repository::getCurrentUser | ( |  | ) |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::getCurrentUserReference() instead.

Get current user.

Returns
  \eZ\Publish\API\Repository\Values\User\User

Implements eZ\Publish\API\Repository\Repository.

Reimplemented in eZ\Publish\Core\REST\Client\IntegrationTestRepository.

Definition at line 105 of file Core/REST/Client/Repository.php.

## ◆ getCurrentUserReference()

eZ\Publish\Core\REST\Client\Repository::getCurrentUserReference | ( |  | ) |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::getCurrentUserReference() instead.

Get current user.

Returns
  \eZ\Publish\API\Repository\Values\User\UserReference

Implements eZ\Publish\API\Repository\Repository.

Definition at line 117 of file Core/REST/Client/Repository.php.

## ◆ getFieldTypeService()

eZ\Publish\Core\REST\Client\Repository::getFieldTypeService | ( |  | ) |

Get FieldTypeService.

Returns
  \eZ\Publish\API\Repository\FieldTypeService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 432 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$fieldTypeService.

## ◆ getIOService()

eZ\Publish\Core\REST\Client\Repository::getIOService | ( |  | ) |

Get IO Service.

Get service object to perform operations on binary files

Returns
  \eZ\Publish\API\Repository\IOService

Definition at line 345 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$ioService.

## ◆ getLocationService()

eZ\Publish\Core\REST\Client\Repository::getLocationService | ( |  | ) |

Get Content Location Service.

Get service object to perform operations on Location objects and subtrees

Returns
  \eZ\Publish\API\Repository\LocationService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 247 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$locationService.

Referenced by eZ\Publish\Core\REST\Client\Repository\getTrashService().

## ◆ getNotificationService()

eZ\Publish\Core\REST\Client\Repository::getNotificationService | ( |  | ) |

Get NotificationService.

Returns
  \eZ\Publish\API\Repository\NotificationService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 486 of file Core/REST/Client/Repository.php.

## ◆ getObjectStateService()

eZ\Publish\Core\REST\Client\Repository::getObjectStateService | ( |  | ) |

Get ObjectStateService.

Returns
  \eZ\Publish\API\Repository\ObjectStateService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 413 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$objectStateService.

## ◆ getPermissionResolver()

eZ\Publish\Core\REST\Client\Repository::getPermissionResolver | ( |  | ) |

Get PermissionResolver.

Returns
  \eZ\Publish\API\Repository\PermissionResolver

Implements eZ\Publish\API\Repository\Repository.

Definition at line 446 of file Core/REST/Client/Repository.php.

## ◆ getRoleService()

eZ\Publish\Core\REST\Client\Repository::getRoleService | ( |  | ) |

Get RoleService.

Returns
  \eZ\Publish\API\Repository\RoleService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 364 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$roleService, and eZ\Publish\Core\REST\Client\Repository\getUserService().

## ◆ getSearchService()

eZ\Publish\Core\REST\Client\Repository::getSearchService | ( |  | ) |

Get Search Service.

Get search service that lets you find content objects

Returns
  \eZ\Publish\API\Repository\SearchService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 312 of file Core/REST/Client/Repository.php.

## ◆ getSectionService()

eZ\Publish\Core\REST\Client\Repository::getSectionService | ( |  | ) |

Get Content Section Service.

Get Section service that lets you manipulate section objects

Returns
  \eZ\Publish\API\Repository\SectionService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 291 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$sectionService.

## ◆ getTrashService()

eZ\Publish\Core\REST\Client\Repository::getTrashService | ( |  | ) |

Get Content Trash service.

Trash service allows to perform operations related to location trash (trash/untrash, load/list from trash...)

Returns
  \eZ\Publish\API\Repository\TrashService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 269 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$trashService, and eZ\Publish\Core\REST\Client\Repository\getLocationService().

## ◆ getURLAliasService()

eZ\Publish\Core\REST\Client\Repository::getURLAliasService | ( |  | ) |

Get URLAliasService.

Returns
  \eZ\Publish\API\Repository\URLAliasService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 384 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$urlAliasService.

## ◆ getURLService()

eZ\Publish\Core\REST\Client\Repository::getURLService | ( |  | ) |

Get URLService.

Returns
  \eZ\Publish\API\Repository\URLService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 456 of file Core/REST/Client/Repository.php.

## ◆ getURLWildcardService()

eZ\Publish\Core\REST\Client\Repository::getURLWildcardService | ( |  | ) |

Get URLWildcardService.

Returns
  \eZ\Publish\API\Repository\URLWildcardService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 403 of file Core/REST/Client/Repository.php.

## ◆ getUserPreferenceService()

eZ\Publish\Core\REST\Client\Repository::getUserPreferenceService | ( |  | ) |

Get UserPreferenceService.

Returns
  \eZ\Publish\API\Repository\UserPreferenceService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 476 of file Core/REST/Client/Repository.php.

## ◆ getUserService()

eZ\Publish\Core\REST\Client\Repository::getUserService | ( |  | ) |

Get User Service.

Get service object to perform operations on Users and UserGroup

Returns
  \eZ\Publish\API\Repository\UserService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 324 of file Core/REST/Client/Repository.php.

References eZ\Publish\Core\REST\Client\Repository\$userService.

Referenced by eZ\Publish\Core\REST\Client\Repository\getRoleService().

## ◆ hasAccess()

eZ\Publish\Core\REST\Client\Repository::hasAccess | ( |  | $module,
|  |  | $function,
|  | UserReference | $user = `null`
| ) |  |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::hasAccess() instead.

Parameters

  string | $module |
  string | $function |
  \eZ\Publish\API\Repository\Values\User\UserReference | $user |

Returns
  bool|\eZ\Publish\API\Repository\Values\User\Limitation[] if limitations are on this function an array of limitations is returned

Implements eZ\Publish\API\Repository\Repository.

Definition at line 147 of file Core/REST/Client/Repository.php.

## ◆ rollback()

eZ\Publish\Core\REST\Client\Repository::rollback | ( |  | ) |

Rollback transaction.

Rollback transaction, or throw exceptions if no transactions has been started.

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 521 of file Core/REST/Client/Repository.php.

## ◆ setCurrentUser()

eZ\Publish\Core\REST\Client\Repository::setCurrentUser | ( | UserReference | $user | ) |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::setCurrentUserReference() instead.

Sets the current user to the given $user.

Parameters

  \eZ\Publish\API\Repository\Values\User\UserReference | $user |

Returns
  void

Implements eZ\Publish\API\Repository\Repository.

Reimplemented in eZ\Publish\Core\REST\Client\IntegrationTestRepository.

Definition at line 131 of file Core/REST/Client/Repository.php.

## ◆ sudo()

eZ\Publish\Core\REST\Client\Repository::sudo | ( | callable | $callback,
|  | APIRepository | $outerRepository = `null`
| ) |  |

{}

Definition at line 529 of file Core/REST/Client/Repository.php.

## Member Data Documentation

## ◆ $client

eZ\Publish\Core\REST\Client\Repository::$client
| private

Definition at line 62 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\__construct().

## ◆ $contentService

eZ\Publish\Core\REST\Client\Repository::$contentService
| private

Definition at line 37 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getContentService().

## ◆ $contentTypeService

eZ\Publish\Core\REST\Client\Repository::$contentTypeService
| private

Definition at line 40 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getContentTypeService().

## ◆ $fieldTypes

eZ\Publish\Core\REST\Client\Repository::$fieldTypes
| private

Definition at line 78 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\__construct(), and eZ\Publish\Core\REST\Client\IntegrationTestRepository\__construct().

## ◆ $fieldTypeService

eZ\Publish\Core\REST\Client\Repository::$fieldTypeService
| private

Definition at line 55 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getFieldTypeService().

## ◆ $inputDispatcher

eZ\Publish\Core\REST\Client\Repository::$inputDispatcher
| private

Definition at line 69 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\__construct(), and eZ\Publish\Core\REST\Client\IntegrationTestRepository\__construct().

## ◆ $ioService

eZ\Publish\Core\REST\Client\Repository::$ioService
| private

Definition at line 52 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getIOService().

## ◆ $languageService

eZ\Publish\Core\REST\Client\Repository::$languageService
| private

Definition at line 25 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getContentLanguageService().

## ◆ $locationService

eZ\Publish\Core\REST\Client\Repository::$locationService
| private

Definition at line 46 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getLocationService().

## ◆ $objectStateService

eZ\Publish\Core\REST\Client\Repository::$objectStateService
| private

Definition at line 49 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getObjectStateService().

## ◆ $outputVisitor

eZ\Publish\Core\REST\Client\Repository::$outputVisitor
| private

Definition at line 72 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\__construct(), and eZ\Publish\Core\REST\Client\IntegrationTestRepository\__construct().

## ◆ $requestParser

eZ\Publish\Core\REST\Client\Repository::$requestParser
| private

Definition at line 75 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\__construct(), and eZ\Publish\Core\REST\Client\IntegrationTestRepository\__construct().

## ◆ $roleService

eZ\Publish\Core\REST\Client\Repository::$roleService
| private

Definition at line 31 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getRoleService().

## ◆ $sectionService

eZ\Publish\Core\REST\Client\Repository::$sectionService
| private

Definition at line 22 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getSectionService().

## ◆ $trashService

eZ\Publish\Core\REST\Client\Repository::$trashService
| private

Definition at line 43 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getTrashService().

## ◆ $urlAliasService

eZ\Publish\Core\REST\Client\Repository::$urlAliasService
| private

Definition at line 34 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getURLAliasService().

## ◆ $userService

eZ\Publish\Core\REST\Client\Repository::$userService
| private

Definition at line 28 of file Core/REST/Client/Repository.php.

Referenced by eZ\Publish\Core\REST\Client\Repository\getUserService().

The documentation for this class was generated from the following file:

- Core/REST/Client/Repository.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.