src/SecucardConnect/Client/FileStorage.php
public function set($key, $value)
    {
        // take care about replacing keys !
        if (is_resource($value) || $value instanceof StreamInterface) {
            $res = file_put_contents($this->filePath($key), $value);
            if ($res !== false) {
                // clear plain storage from key
                return $this->deleteStore($key);
            }
            return $res;
        } else {
            $this->storage[$key] = $value;
            $res = $this->save();
            if ($res !== false) {
                // clear file storage from key
                return $this->deleteFile($key);
            }
            return $res;
        }
    }
public function set($key, $value)
    {
        // take care about replacing keys !
        if (is_resource($value) || $value instanceof StreamInterface) {
            $res = file_put_contents($this->filePath($key), $value);
            if ($res !== false) {
                // clear plain storage from key
                return $this->deleteStore($key);
            }
            return $res;
        } else {
            $this->storage[$key] = $value;
            $res = $this->save();
            if ($res !== false) {
                // clear file storage from key
                return $this->deleteFile($key);
            }
            return $res;
        }
    }
public function set ( $ key , $ value ) { // take care about replacing keys ! if ( is_resource ( $ value ) || $ value instanceof StreamInterface ) { $ res = file_put_contents ( $ this -> filePath ( $ key ) , $ value ) ; if ( $ res !== false ) { // clear plain storage from key return $ this -> deleteStore ( $ key ) ; } return $ res ; } else { $ this -> storage [ $ key ] = $ value ; $ res = $ this -> save ( ) ; if ( $ res !== false ) { // clear file storage from key return $ this -> deleteFile ( $ key ) ; } return $ res ; } }
Set an item in the cache

@param string $key
@param mixed $value
@return bool
Set an item in the cache