src/Adapters/Flysystem.php
protected function read($key)
    {
        $path = $this->path($key);
        try {
            $data = $this->filesystem->read($path);
        } catch (FileNotFoundException $e) {
            // unlikely given previous 'exists' check, but let's play safe...
            // (outside process may have removed it since)
            return false;
        }

        if ($data === false) {
            // in theory, a file could still be deleted between Flysystem's
            // assertPresent & the time it actually fetched the content
            // extremely unlikely though
            return false;
        }

        $data = explode("\n", $data, 2);
        $data[0] = (int) $data[0];

        return $data;
    }
protected function read($key)
    {
        $path = $this->path($key);
        try {
            $data = $this->filesystem->read($path);
        } catch (FileNotFoundException $e) {
            // unlikely given previous 'exists' check, but let's play safe...
            // (outside process may have removed it since)
            return false;
        }

        if ($data === false) {
            // in theory, a file could still be deleted between Flysystem's
            // assertPresent & the time it actually fetched the content
            // extremely unlikely though
            return false;
        }

        $data = explode("\n", $data, 2);
        $data[0] = (int) $data[0];

        return $data;
    }
protected function read ( $ key ) { $ path = $ this -> path ( $ key ) ; try { $ data = $ this -> filesystem -> read ( $ path ) ; } catch ( FileNotFoundException $ e ) { // unlikely given previous 'exists' check, but let's play safe... // (outside process may have removed it since) return false ; } if ( $ data === false ) { // in theory, a file could still be deleted between Flysystem's // assertPresent & the time it actually fetched the content // extremely unlikely though return false ; } $ data = explode ( "\n" , $ data , 2 ) ; $ data [ 0 ] = ( int ) $ data [ 0 ] ; return $ data ; }
Fetch stored data from cache file.

@param string $key

@return bool|array
Fetch stored data from cache file .