public function get(string $key): ?\BearFramework\App\CacheItem
    {
        $driver = $this->getDriver();
        $item = null;
        $value = $driver->get($key);
        if ($value !== null) {
            $item = $this->make($key, $value);
        }
        if ($this->hasEventListeners('itemGet')) {
            $this->dispatchEvent('itemGet', new \BearFramework\App\Cache\ItemGetEventDetails($key, $item === null ? null : clone($item)));
        }
        if ($this->hasEventListeners('itemRequest')) {
            $this->dispatchEvent('itemRequest', new \BearFramework\App\Cache\ItemRequestEventDetails($key));
        }
        return $item;
    }
public function get(string $key): ?\BearFramework\App\CacheItem
    {
        $driver = $this->getDriver();
        $item = null;
        $value = $driver->get($key);
        if ($value !== null) {
            $item = $this->make($key, $value);
        }
        if ($this->hasEventListeners('itemGet')) {
            $this->dispatchEvent('itemGet', new \BearFramework\App\Cache\ItemGetEventDetails($key, $item === null ? null : clone($item)));
        }
        if ($this->hasEventListeners('itemRequest')) {
            $this->dispatchEvent('itemRequest', new \BearFramework\App\Cache\ItemRequestEventDetails($key));
        }
        return $item;
    }
public function get ( string $ key ) : ? \ BearFramework \ App \ CacheItem { $ driver = $ this -> getDriver ( ) ; $ item = null ; $ value = $ driver -> get ( $ key ) ; if ( $ value !== null ) { $ item = $ this -> make ( $ key , $ value ) ; } if ( $ this -> hasEventListeners ( 'itemGet' ) ) { $ this -> dispatchEvent ( 'itemGet' , new \ BearFramework \ App \ Cache \ ItemGetEventDetails ( $ key , $ item === null ? null : clone ( $ item ) ) ) ; } if ( $ this -> hasEventListeners ( 'itemRequest' ) ) { $ this -> dispatchEvent ( 'itemRequest' , new \ BearFramework \ App \ Cache \ ItemRequestEventDetails ( $ key ) ) ; } return $ item ; }
Returns the cache item stored or null if not found.

@param string $key The key of the cache item.
@return \BearFramework\App\CacheItem|null The cache item stored or null if not found.
Returns the cache item stored or null if not found .