Horde_Registry::downloadUrl PHP Method

downloadUrl() public method

Returns a URL to be used for downloading data.
public downloadUrl ( string $filename, array $params = [] ) : Horde_Url
$filename string The filename of the download data.
$params array Additional URL parameters needed.
return Horde_Url The download URL. This URL should be used as-is, since the filename MUST be the last parameter added to the URL.
    public function downloadUrl($filename, array $params = array())
    {
        $url = $this->getServiceLink('download', $this->getApp())->add($params);
        if (strlen($filename)) {
            /* Add the filename to the end of the URL. Although not necessary
             * for many browsers, this should allow every browser to download
             * correctly. */
            $url->add('fn', '/' . $filename);
        }
        return $url;
    }