lib/base/FileStorage.php
public function getTempFile($keep = false, $ext = null)
    {
        $tmp = tempnam($this->tempPath, "tmp_");
        $tmpExt = '';
        if (!is_null($ext)) {
            $tmpExt .= ".{$ext}";
        }
        if (!$keep) {
            $this->_tempFiles[] = $tmp;
            if (!empty($tmpExt)) {
                $tmp = $tmp . $tmpExt;
                $this->_tempFiles[] = $tmp;
            }
        } else {
            if (!empty($tmpExt)) {
                $tmp = $tmp . $tmpExt;
            }
        }

        return $tmp;
    }
public function getTempFile($keep = false, $ext = null)
    {
        $tmp = tempnam($this->tempPath, "tmp_");
        $tmpExt = '';
        if (!is_null($ext)) {
            $tmpExt .= ".{$ext}";
        }
        if (!$keep) {
            $this->_tempFiles[] = $tmp;
            if (!empty($tmpExt)) {
                $tmp = $tmp . $tmpExt;
                $this->_tempFiles[] = $tmp;
            }
        } else {
            if (!empty($tmpExt)) {
                $tmp = $tmp . $tmpExt;
            }
        }

        return $tmp;
    }
public function getTempFile ( $ keep = false , $ ext = null ) { $ tmp = tempnam ( $ this -> tempPath , "tmp_" ) ; $ tmpExt = '' ; if ( ! is_null ( $ ext ) ) { $ tmpExt .= ".{$ext}" ; } if ( ! $ keep ) { $ this -> _tempFiles [ ] = $ tmp ; if ( ! empty ( $ tmpExt ) ) { $ tmp = $ tmp . $ tmpExt ; $ this -> _tempFiles [ ] = $ tmp ; } } else { if ( ! empty ( $ tmpExt ) ) { $ tmp = $ tmp . $ tmpExt ; } } return $ tmp ; }
Get a temporary file.

@param boolean $keep Keep the file after request has been processed (optional)
@param unknown $ext  Extension of temporary file (optional)

@return string Temporary file path
Get a temporary file .