public function read()
    {
        $this->open();

        // Better performance than fread() from the existing handle
        // but it doesn't respect flock
        $data = file_get_contents($this->filePath);

        if ($data === false) {
            throw new \RuntimeException("Could not read from file " . $this->filePath);
        }
        return $data;
    }
public function read()
    {
        $this->open();

        // Better performance than fread() from the existing handle
        // but it doesn't respect flock
        $data = file_get_contents($this->filePath);

        if ($data === false) {
            throw new \RuntimeException("Could not read from file " . $this->filePath);
        }
        return $data;
    }
public function read ( ) { $ this -> open ( ) ; // Better performance than fread() from the existing handle // but it doesn't respect flock $ data = file_get_contents ( $ this -> filePath ) ; if ( $ data === false ) { throw new \ RuntimeException ( "Could not read from file " . $ this -> filePath ) ; } return $ data ; }
Reads contents of the opened file

@return string Read data
@throws \RuntimeException On read error
Reads contents of the opened file