ManaPHP\Http\Response::setFileToSend PHP Method

setFileToSend() public method

Sets an attached file to be sent at the end of the request
public setFileToSend ( string $file, string $attachmentName = null ) : static
$file string
$attachmentName string
return static
    public function setFileToSend($file, $attachmentName = null)
    {
        if ($attachmentName === null) {
            $attachmentName = basename($file);
        }
        $this->_file = $file;
        $this->setAttachment($attachmentName);
        return $this;
    }