create() public static method

public static create ( string $key ) : self
$key string
return self
Beispiel #1
0
 /**
  * @param string $key
  *
  * @throws CachedValueNotFound
  *
  * @return mixed
  */
 public function getCachedValue(string $key)
 {
     if (false === array_key_exists($key, $this->cache)) {
         throw CachedValueNotFound::create($key);
     }
     return $this->cache[$key];
 }