protected function writeToBigStorageIfNeeded($id, &$value)
    {
        if (!$this->bigStorage) {
            return false;
        }

        if (is_string($value) && strlen($value) <= $this->maxMainStorageBytes) {
            return false;
        }

        try {
            $this->bigStorage[$id] = $value;
            return true;
        } catch (\Exception $e) {
            $msg = "Data of id #$id (type:" . Type::of($value) . ") couldnt be written to big storage";
            $e = new DataIntegrityException($msg, 0, $e);
            $this->callOnListeners('error', [$e]);
        }

        return false;

    }
protected function writeToBigStorageIfNeeded($id, &$value)
    {
        if (!$this->bigStorage) {
            return false;
        }

        if (is_string($value) && strlen($value) <= $this->maxMainStorageBytes) {
            return false;
        }

        try {
            $this->bigStorage[$id] = $value;
            return true;
        } catch (\Exception $e) {
            $msg = "Data of id #$id (type:" . Type::of($value) . ") couldnt be written to big storage";
            $e = new DataIntegrityException($msg, 0, $e);
            $this->callOnListeners('error', [$e]);
        }

        return false;

    }
protected function writeToBigStorageIfNeeded ( $ id , & $ value ) { if ( ! $ this -> bigStorage ) { return false ; } if ( is_string ( $ value ) && strlen ( $ value ) <= $ this -> maxMainStorageBytes ) { return false ; } try { $ this -> bigStorage [ $ id ] = $ value ; return true ; } catch ( \ Exception $ e ) { $ msg = "Data of id #$id (type:" . Type :: of ( $ value ) . ") couldnt be written to big storage" ; $ e = new DataIntegrityException ( $ msg , 0 , $ e ) ; $ this -> callOnListeners ( 'error' , [ $ e ] ) ; } return false ; }
Writes to big storage if that is possible.

@param string $id
@param mixed  $value

@return bool
Writes to big storage if that is possible .