public function fread()
    {
        try {
            $file = $this->openFile('r');
        } catch (\Exception $exc) {
            throw new \RuntimeException('Unable to open file', 0, $exc);
        }

        $result = '';
        foreach ($file as $line) {
            $result .= $line;
        }

        return $result;
    }
public function fread()
    {
        try {
            $file = $this->openFile('r');
        } catch (\Exception $exc) {
            throw new \RuntimeException('Unable to open file', 0, $exc);
        }

        $result = '';
        foreach ($file as $line) {
            $result .= $line;
        }

        return $result;
    }
public function fread ( ) { try { $ file = $ this -> openFile ( 'r' ) ; } catch ( \ Exception $ exc ) { throw new \ RuntimeException ( 'Unable to open file' , 0 , $ exc ) ; } $ result = '' ; foreach ( $ file as $ line ) { $ result .= $ line ; } return $ result ; }
Returns the file contents as a string.

@return string
@throws \RuntimeException if unable to open the file
Returns the file contents as a string .