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

Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler Class Reference

Language Handler. More...

Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler:

## Public Member Functions
| __construct (BaseLanguageHandler $innerHandler, InMemoryCache $cache, CacheIdentifierGeneratorInterface $cacheIdentifierGenerator)
| Creates a caching handler around $innerHandler. More...
| create (CreateStruct $struct)
| Create a new language. More...
| update (Language $language)
| Update language. More...
| load ($id)
| Get language by id. More...
| loadList (array $ids)
  | {Get list of languages by id.Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up to calling logic to determine if this should cause exception or not. Parameters
  array | $ids |
Returns \eZ\Publish\SPI\Persistence\Content\Language[]|iterable } More...
| loadByLanguageCode ($languageCode)
| Get language by Language Code (eg: eng-GB). More...
| loadListByLanguageCodes (array $languageCodes)
  | {Get list of languages by Language Code (eg: eng-GB).Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up to calling logic to determine if this should cause exception or not. Parameters
  string[] | $languageCodes |
Returns \eZ\Publish\SPI\Persistence\Content\Language[]|iterable } More...
| loadAll ()
| Get all languages. More...
| delete ($id)
| Delete a language. More...
| clearCache ()
| Clear internal in-memory cache. More...

## Protected Member Functions
| storeCache (array $languages, string $listIndex=null)
| Helper to store languages in internal in-memory cache with all needed keys. More...

## Protected Attributes
| $innerHandler
| $cache
| $cacheIdentifierGenerator

## Private Attributes
const | LANGUAGE_IDENTIFIER = 'language'
const | LANGUAGE_CODE_IDENTIFIER = 'language_code'
const | LANGUAGE_LIST_IDENTIFIER = 'language_list'

## Detailed Description

Language Handler.

Definition at line 18 of file CachingHandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::__construct | ( | BaseLanguageHandler | $innerHandler,
|  | InMemoryCache | $cache,
|  | CacheIdentifierGeneratorInterface | $cacheIdentifierGenerator
| ) |  |

Creates a caching handler around $innerHandler.

Parameters

  \eZ\Publish\SPI\Persistence\Content\Language\Handler | $innerHandler |
  \eZ\Publish\Core\Persistence\Cache\InMemory\InMemoryCache | $cache |
  \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface | $cacheIdentifierGenerator |

Definition at line 48 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\$cache, eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\$cacheIdentifierGenerator, and eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\$innerHandler.

## Member Function Documentation

## ◆ clearCache()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::clearCache | ( |  | ) |

Clear internal in-memory cache.

Definition at line 216 of file CachingHandler.php.

## ◆ create()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::create | ( | CreateStruct | $struct | ) |

Create a new language.

Parameters

  \eZ\Publish\SPI\Persistence\Content\Language\CreateStruct | $struct |

Returns
  \eZ\Publish\SPI\Persistence\Content\Language

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 65 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ delete()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::delete | ( |  | $id | ) |

Delete a language.

Parameters

  mixed | $id |

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 203 of file CachingHandler.php.

## ◆ load()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::load | ( |  | $id | ) |

Get language by id.

Parameters

  mixed | $id |

Exceptions

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 93 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ loadAll()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::loadAll | ( |  | ) |

Get all languages.

Returns
  \eZ\Publish\SPI\Persistence\Content\Language[]

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 185 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ loadByLanguageCode()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::loadByLanguageCode | ( |  | $languageCode | ) |

Get language by Language Code (eg: eng-GB).

Parameters

  string | $languageCode |

Exceptions

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 141 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ loadList()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::loadList | ( | array | $ids | ) |

{Get list of languages by id.Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up to calling logic to determine if this should cause exception or not.

Parameters

  array | $ids |

Returns
  \eZ\Publish\SPI\Persistence\Content\Language[]|iterable

}

@noinspection AdditionOperationOnArraysInspection

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 110 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ loadListByLanguageCodes()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::loadListByLanguageCodes | ( | array | $languageCodes | ) |

{Get list of languages by Language Code (eg: eng-GB).Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up to calling logic to determine if this should cause exception or not.

Parameters

  string[] | $languageCodes |

Returns
  \eZ\Publish\SPI\Persistence\Content\Language[]|iterable

}

@noinspection AdditionOperationOnArraysInspection

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 158 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ storeCache()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::storeCache | ( | array | $languages,
|  | string | $listIndex = `null`
| ) |  |
| protected

Helper to store languages in internal in-memory cache with all needed keys.

Parameters

  array | $languages |
  string | null | $listIndex |

Definition at line 227 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\$cacheIdentifierGenerator.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\create(), eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\load(), eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\loadAll(), eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\loadByLanguageCode(), eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\loadList(), eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\loadListByLanguageCodes(), and eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\update().

## ◆ update()

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::update | ( | Language | $language | ) |

Update language.

Parameters

  \eZ\Publish\SPI\Persistence\Content\Language | $language |

Implements eZ\Publish\SPI\Persistence\Content\Language\Handler.

Definition at line 78 of file CachingHandler.php.

References eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## Member Data Documentation

## ◆ $cache

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::$cache
| protected

Definition at line 36 of file CachingHandler.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\__construct().

## ◆ $cacheIdentifierGenerator

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::$cacheIdentifierGenerator
| protected

Definition at line 39 of file CachingHandler.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\__construct(), and eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\storeCache().

## ◆ $innerHandler

eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::$innerHandler
| protected

Definition at line 29 of file CachingHandler.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler\__construct().

## ◆ LANGUAGE_CODE_IDENTIFIER

const eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::LANGUAGE_CODE_IDENTIFIER = 'language_code'
| private

Definition at line 21 of file CachingHandler.php.

## ◆ LANGUAGE_IDENTIFIER

const eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::LANGUAGE_IDENTIFIER = 'language'
| private

Definition at line 20 of file CachingHandler.php.

## ◆ LANGUAGE_LIST_IDENTIFIER

const eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler::LANGUAGE_LIST_IDENTIFIER = 'language_list'
| private

Definition at line 22 of file CachingHandler.php.

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

- CachingHandler.php

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