rSream = self::$aStreams[$sHashName]; \fseek($this->rSream, 0); $bResult = true; } else { $this->rSream = fopen('php://memory', 'r+b'); self::$aStreams[$sHashName] = $this->rSream; $bResult = true; \MailSo\Base\Loader::IncStatistic('CreateStream/TempFile'); } } return $bResult; } public function stream_close() : bool { return true; } public function stream_flush() : bool { return fflush($this->rSream); } public function stream_read(int $iLen) : string { return fread($this->rSream, $iLen); } public function stream_write(string $sInputString) : int { return fwrite($this->rSream, $sInputString); } public function stream_tell() : int { return ftell($this->rSream); } public function stream_eof() : bool { return feof($this->rSream); } public function stream_stat() : array { return fstat($this->rSream); } public function stream_seek(int $iOffset, int $iWhence = SEEK_SET) : int { return fseek($this->rSream, $iOffset, $iWhence); } }