@@ -28,7 +28,7 @@ class File
28
28
*
29
29
* @param string $content the tmp file content
30
30
* @param string|null $suffix the optional suffix for the tmp file
31
- * @param string|null $suffix the optional prefix for the tmp file. If null 'php_tmpfile_' is used.
31
+ * @param string|null $prefix the optional prefix for the tmp file. If null 'php_tmpfile_' is used.
32
32
* @param string|null $directory directory where the file should be created. Autodetected if not provided.
33
33
*/
34
34
public function __construct ($ content , $ suffix = null , $ prefix = null , $ directory = null )
@@ -64,10 +64,10 @@ public function __destruct()
64
64
* Send tmp file to client, either inline or as download
65
65
*
66
66
* @param string|null $filename the filename to send. If empty, the file is streamed inline.
67
- * @param string the Content-Type header
67
+ * @param string $contentType the Content-Type header
68
68
* @param bool $inline whether to force inline display of the file, even if filename is present.
69
69
*/
70
- public function send ($ name = null , $ contentType , $ inline = false )
70
+ public function send ($ filename = null , $ contentType , $ inline = false )
71
71
{
72
72
header ('Pragma: public ' );
73
73
header ('Expires: 0 ' );
@@ -76,9 +76,9 @@ public function send($name = null, $contentType, $inline = false)
76
76
header ('Content-Transfer-Encoding: binary ' );
77
77
header ('Content-Length: ' .filesize ($ this ->_fileName ));
78
78
79
- if ($ name !==null || $ inline ) {
79
+ if ($ filename !==null || $ inline ) {
80
80
$ disposition = $ inline ? 'inline ' : 'attachment ' ;
81
- header ("Content-Disposition: $ disposition; filename= \"$ name \"" );
81
+ header ("Content-Disposition: $ disposition; filename= \"$ filename \"" );
82
82
}
83
83
84
84
readfile ($ this ->_fileName );
0 commit comments