HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //usr/share/php/PhpMyAdmin/MoTranslator/Cache/CacheInterface.php
<?php

declare(strict_types=1);

namespace PhpMyAdmin\MoTranslator\Cache;

interface CacheInterface
{
    /**
     * Returns cached `msgstr` if it is in cache, otherwise `$msgid`
     */
    public function get(string $msgid): string;

    /**
     * Caches `$msgstr` value for key `$mesid`
     */
    public function set(string $msgid, string $msgstr): void;

    /**
     * Returns true if cache has entry for `$msgid`
     */
    public function has(string $msgid): bool;

    /**
     * Populates cache with array of `$msgid => $msgstr` entries
     *
     * This will overwrite existing values for `$msgid`, but is not guaranteed to clear cache of existing entries
     * not present in `$translations`.
     *
     * @param array<string, string> $translations
     */
    public function setAll(array $translations): void;
}