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\Persistence\Cache\UserPreferenceHandler Class Reference

SPI cache for UserPreference Handler. More...

Inheritance diagram for eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler:

## Public Member Functions
| setUserPreference (UserPreferenceSetStruct $setStruct)
| {} More...
| countUserPreferences (int $userId)
| {} More...
| getUserPreferenceByUserIdAndName (int $userId, string $name)
| {} More...
| loadUserPreferences (int $userId, int $offset, int $limit)
| {} More...
Public Member Functions inherited from eZ\Publish\Core\Persistence\Cache\AbstractInMemoryPersistenceHandler
| __construct (TransactionAwareAdapterInterface $cache, PersistenceLogger $logger, InMemoryCache $inMemory, PersistenceHandler $persistenceHandler, CacheIdentifierGeneratorInterface $cacheIdentifierGenerator, CacheIdentifierSanitizer $cacheIdentifierSanitizer, LocationPathConverter $locationPathConverter)
| Setups current handler with everything needed. More...
Public Member Functions inherited from eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler
| __construct (TransactionAwareAdapterInterface $cache, PersistenceLogger $logger, InMemoryCache $inMemory)
| Setups current handler with everything needed. More...
Public Member Functions inherited from eZ\Publish\Core\Persistence\Cache\Handler
| __construct (PersistenceHandlerInterface $persistenceHandler, CacheSectionHandler $sectionHandler, CacheLocationHandler $locationHandler, CacheContentHandler $contentHandler, CacheContentLanguageHandler $contentLanguageHandler, CacheContentTypeHandler $contentTypeHandler, CacheUserHandler $userHandler, CacheTransactionHandler $transactionHandler, CacheTrashHandler $trashHandler, CacheUrlAliasHandler $urlAliasHandler, CacheObjectStateHandler $objectStateHandler, CacheUrlHandler $urlHandler, CacheBookmarkHandler $bookmarkHandler, CacheNotificationHandler $notificationHandler, CacheUserPreferenceHandler $userPreferenceHandler, CacheUrlWildcardHandler $urlWildcardHandler, PersistenceLogger $logger)
| contentHandler ()
| contentTypeHandler ()
| contentLanguageHandler ()
| locationHandler ()
| objectStateHandler ()
| userHandler ()
| sectionHandler ()
| trashHandler ()
| urlAliasHandler ()
| urlWildcardHandler ()
| transactionHandler ()
| urlHandler ()
| bookmarkHandler ()
| notificationHandler ()
| userPreferenceHandler ()
| beginTransaction ()
| {Begin transaction.Begins an transaction, make sure you'll call commit or rollback when done, otherwise work will be lost. Deprecated: Since 5.3 {@use transactionHandler()->beginTransaction()} } More...
| commit ()
  | {Commit transaction.Commit transaction, or throw exceptions if no transactions has been started. Exceptions
} More...
| rollback ()
  | {Rollback transaction.Rollback transaction, or throw exceptions if no transactions has been started. Exceptions
} More...

## Private Attributes
const | USER_PREFERENCE_IDENTIFIER = 'user_preference'
const | USER_PREFERENCE_WITH_SUFFIX_IDENTIFIER = 'user_preference_with_suffix'
const | NOT_FOUND = 'NotFoundException'
| Constant used for storing not found results for getUserPreferenceByUserIdAndName(). More...

## Additional Inherited Members
Protected Member Functions inherited from eZ\Publish\Core\Persistence\Cache\AbstractInMemoryPersistenceHandler
| init ()
| Optional function to initialize handler without having to overload __construct(). More...
Protected Member Functions inherited from eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler
| getCacheValue ( $id, string $keyPrefix, callable $backendLoader, callable $cacheTagger, callable $cacheIndexes, string $keySuffix='', array $arguments=[])
| Load one cache item from cache and loggs the hits / misses. More...
| getListCacheValue (string $key, callable $backendLoader, callable $cacheTagger, callable $cacheIndexes, callable $listTags=null, array $arguments=[])
| Load list of objects of some type and loggs the hits / misses. More...
| getMultipleCacheValues (array $ids, string $keyPrefix, callable $backendLoader, callable $cacheTagger, callable $cacheIndexes, string $keySuffix='', array $arguments=[])
| Load several cache items from cache and loggs the hits / misses. More...
Protected Attributes inherited from eZ\Publish\Core\Persistence\Cache\AbstractInMemoryPersistenceHandler
| $persistenceHandler
| $cacheIdentifierGenerator
| $cacheIdentifierSanitizer
| $locationPathConverter
Protected Attributes inherited from eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler
| $cache
| $logger
Protected Attributes inherited from eZ\Publish\Core\Persistence\Cache\Handler
| $persistenceHandler
| $sectionHandler
| $contentHandler
| $contentLanguageHandler
| $contentTypeHandler
| $locationHandler
| $userHandler
| $trashHandler
| $urlAliasHandler
| $objectStateHandler
| $transactionHandler
| $urlHandler
| $bookmarkHandler
| $notificationHandler
| $userPreferenceHandler
| $logger

## Detailed Description

SPI cache for UserPreference Handler.

See also
  \eZ\Publish\SPI\Persistence\UserPreference\Handler

Definition at line 22 of file UserPreferenceHandler.php.

## Member Function Documentation

## ◆ countUserPreferences()

eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::countUserPreferences | ( | int | $userId | ) |

{}

Definition at line 55 of file UserPreferenceHandler.php.

## ◆ getUserPreferenceByUserIdAndName()

eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::getUserPreferenceByUserIdAndName | ( | int | $userId,
|  | string | $name
| ) |  |

{}

Needs to store NotFoundExceptions as UserPreference feature heavily uses this in valid lookups.

Definition at line 69 of file UserPreferenceHandler.php.

References eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler\getCacheValue(), and eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler\NOT_FOUND.

## ◆ loadUserPreferences()

eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::loadUserPreferences | ( | int | $userId,
|  | int | $offset,
|  | int | $limit
| ) |  |

{}

Definition at line 109 of file UserPreferenceHandler.php.

## ◆ setUserPreference()

eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::setUserPreference | ( | UserPreferenceSetStruct | $setStruct | ) |

{}

Definition at line 35 of file UserPreferenceHandler.php.

## Member Data Documentation

## ◆ NOT_FOUND

const eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::NOT_FOUND = 'NotFoundException'
| private

Constant used for storing not found results for getUserPreferenceByUserIdAndName().

Definition at line 30 of file UserPreferenceHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler\getUserPreferenceByUserIdAndName().

## ◆ USER_PREFERENCE_IDENTIFIER

const eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::USER_PREFERENCE_IDENTIFIER = 'user_preference'
| private

Definition at line 24 of file UserPreferenceHandler.php.

## ◆ USER_PREFERENCE_WITH_SUFFIX_IDENTIFIER

const eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler::USER_PREFERENCE_WITH_SUFFIX_IDENTIFIER = 'user_preference_with_suffix'
| private

Definition at line 25 of file UserPreferenceHandler.php.

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

- UserPreferenceHandler.php

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