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

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\Persistence\Cache\AbstractHandler Class Reference

Class AbstractHandler. More...

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

## Public Member Functions
| __construct (TagAwareAdapterInterface $cache, PersistenceHandler $persistenceHandler, PersistenceLogger $logger, CacheIdentifierGeneratorInterface $cacheIdentifierGenerator, CacheIdentifierSanitizer $cacheIdentifierSanitizer, LocationPathConverter $locationPathConverter)
| Setups current handler with everything needed. More...

## Protected Member Functions
| getMultipleCacheItems (array $ids, string $keyPrefix, callable $missingLoader, callable $loadedTagger, array $keySuffixes=[])
| Helper for getting multiple cache items in one call and do the id extraction for you. More...

## Protected Attributes
| $cache
| $persistenceHandler
| $logger
| $cacheIdentifierGenerator
| $cacheIdentifierSanitizer
| $locationPathConverter

## Detailed Description

Class AbstractHandler.

Abstract handler for use in other Persistence Cache Handlers.

Definition at line 20 of file AbstractHandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Persistence\Cache\AbstractHandler::__construct | ( | TagAwareAdapterInterface | $cache,
|  | PersistenceHandler | $persistenceHandler,
|  | PersistenceLogger | $logger,
|  | CacheIdentifierGeneratorInterface | $cacheIdentifierGenerator,
|  | CacheIdentifierSanitizer | $cacheIdentifierSanitizer,
|  | LocationPathConverter | $locationPathConverter
| ) |  |

Setups current handler with everything needed.

Parameters

  \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface | $cache |
  \eZ\Publish\SPI\Persistence\Handler | $persistenceHandler |
  \eZ\Publish\Core\Persistence\Cache\PersistenceLogger | $logger |
  \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface | $cacheIdentifierGenerator |
  \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer | $cacheIdentifierSanitizer |
  \Ibexa\Core\Persistence\Cache\LocationPathConverter | $locationPathConverter |

Definition at line 50 of file AbstractHandler.php.

References eZ\Publish\Core\Persistence\Cache\AbstractHandler\$cache, eZ\Publish\Core\Persistence\Cache\AbstractHandler\$cacheIdentifierGenerator, eZ\Publish\Core\Persistence\Cache\AbstractHandler\$cacheIdentifierSanitizer, eZ\Publish\Core\Persistence\Cache\AbstractHandler\$locationPathConverter, eZ\Publish\Core\Persistence\Cache\AbstractHandler\$logger, and eZ\Publish\Core\Persistence\Cache\AbstractHandler\$persistenceHandler.

## Member Function Documentation

## ◆ getMultipleCacheItems()

eZ\Publish\Core\Persistence\Cache\AbstractHandler::getMultipleCacheItems | ( | array | $ids,
|  | string | $keyPrefix,
|  | callable | $missingLoader,
|  | callable | $loadedTagger,
|  | array | $keySuffixes = `[]`
| ) |  |
| final protected

Helper for getting multiple cache items in one call and do the id extraction for you.

Cache items must be stored with a key in the following format "${keyPrefix}${id}", like "ez-content-info-${id}", in order for this method to be able to prefix key on id's and also extract key prefix afterwards.

It also optionally supports a key suffixs, for use on a variable argument that affects all lookups, like translations, i.e. "ez-content-${id}-${translationKey}" where $keySuffixes = [$id => "-${translationKey}"].

Parameters

  array | $ids |
  string | $keyPrefix | E.g "ez-content-"
  callable | $missingLoader | Function for loading missing objects, gets array with missing id's as argument, expects return value to be array with id as key. Missing items should be missing.
  callable | $loadedTagger | Function for tagging loaded object, gets object as argument, return array of tags.
  array | $keySuffixes | Optional, key is id as provided in $ids, and value is a key suffix e.g. "-eng-Gb"

Returns
  array

Definition at line 84 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\BookmarkHandler\loadByUserIdAndLocationId().

## Member Data Documentation

## ◆ $cache

eZ\Publish\Core\Persistence\Cache\AbstractHandler::$cache
| protected

Definition at line 23 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\AbstractHandler\__construct().

## ◆ $cacheIdentifierGenerator

eZ\Publish\Core\Persistence\Cache\AbstractHandler::$cacheIdentifierGenerator
| protected

Definition at line 32 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\AbstractHandler\__construct().

## ◆ $cacheIdentifierSanitizer

eZ\Publish\Core\Persistence\Cache\AbstractHandler::$cacheIdentifierSanitizer
| protected

Definition at line 35 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\AbstractHandler\__construct().

## ◆ $locationPathConverter

eZ\Publish\Core\Persistence\Cache\AbstractHandler::$locationPathConverter
| protected

Definition at line 38 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\AbstractHandler\__construct().

## ◆ $logger

eZ\Publish\Core\Persistence\Cache\AbstractHandler::$logger
| protected

Definition at line 29 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\AbstractHandler\__construct().

## ◆ $persistenceHandler

eZ\Publish\Core\Persistence\Cache\AbstractHandler::$persistenceHandler
| protected

Definition at line 26 of file AbstractHandler.php.

Referenced by eZ\Publish\Core\Persistence\Cache\AbstractHandler\__construct().

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

- AbstractHandler.php

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