Automattic\WooCommerce\Vendor\Pelago\Emogrifier\Caching

SimpleStringCache::getpublicWC 1.0

Returns the entry stored for the given key, and throws an exception if the value does not exist (which helps keep the return type simple).

Method of the class: SimpleStringCache{}

No Hooks.

Returns

String. the retrieved value; may be empty

Usage

$SimpleStringCache = new SimpleStringCache();
$SimpleStringCache->get( $key ): string;
$key(string) (required)
the key to of the item to retrieve; must not be empty.

SimpleStringCache::get() code WC 10.5.0

public function get(string $key): string
{
    if (!$this->has($key)) {
        throw new \BadMethodCallException('You can only call `get` with a key for an existing value.', 1625996246);
    }

    return $this->values[$key];
}