rSream = self::$aStreams[$sHashName]; $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; } /** * @return bool */ public function stream_close() { return -1 !== fseek($this->rSream, 0); } /** * @return bool */ public function stream_flush() { return fflush($this->rSream); } /** * @param int $iLen * * @return string */ public function stream_read($iLen) { return fread($this->rSream, $iLen); } /** * @param string $sInputString * * @return int */ public function stream_write($sInputString) { return fwrite($this->rSream, $sInputString); } /** * @return int */ public function stream_tell() { return ftell($this->rSream); } /** * @return bool */ public function stream_eof() { return feof($this->rSream); } /** * @return array */ public function stream_stat() { return fstat($this->rSream); } /** * @param int $iOffset * @param int $iWhence = SEEK_SET * * @return int */ public function stream_seek($iOffset, $iWhence = SEEK_SET) { return fseek($this->rSream, $iOffset, $iWhence); } }