stream = new LazyOpenStream($filename, 'r'); } /** * Output the contents of the file to the output buffer */ public function emit() { readfile($this->filename); } public function isWritable(): bool { return false; } /** * @throws \RuntimeException on failure. */ public function write(string $string): int { throw new \RuntimeException('Cannot write to a ' . self::class, 1538331833); } /** * Creates the underlying stream lazily when required. */ protected function createStream(): StreamInterface { return $this->stream->stream; } }