IMP_Compose_Attachment_Storage::getTempFile PHP Méthode

getTempFile() public méthode

Writes attachment data to a temporary file.
public getTempFile ( ) : string
Résultat string Temporary file path.
    public function getTempFile()
    {
        if (isset($this->_tmpfile)) {
            return $this->_tmpfile;
        }
        $stream = $this->read();
        $tmp = Horde::getTempFile('impatt');
        $fd = fopen($tmp, 'w+');
        while (!$stream->eof()) {
            fwrite($fd, $stream->substring(0, 65536));
        }
        fclose($fd);
        $stream->close();
        return $tmp;
    }