Automattic\WooCommerce\EmailEditorVendor\Pelago\Emogrifier\Caching

SimpleStringCache::get │ public │ WC 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 11.3.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];
}