method called setStreamName will be used to store filename in XSendFileStreamResponseSender.
basename() is not a good idea because $filename will be used as in XSendFileStreamResponseSender
f.e. 
nginx Header   (location /protected could be opted in nginx vhost)
X-Accel-Redirect: /protected/path/to/file/which/will/be/downloaded.tar.gz
real path matched to the location /protected is /var/www/download
file could be downloaded from  /var/www/download/path/to/file/which/will/be/downloaded.tar.gz

with basename() not exist file  /var/www/download/downloaded.tar.gz