Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/AphrontFileResponse.php
Show All 13 Lines | final class AphrontFileResponse extends AphrontResponse { | ||||
private $allowOrigins = array(); | private $allowOrigins = array(); | ||||
public function addAllowOrigin($origin) { | public function addAllowOrigin($origin) { | ||||
$this->allowOrigins[] = $origin; | $this->allowOrigins[] = $origin; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setDownload($download) { | public function setDownload($download) { | ||||
if (!strlen($download)) { | if (!phutil_nonempty_string($download)) { | ||||
$download = 'untitled'; | $download = 'untitled'; | ||||
} | } | ||||
$this->download = $download; | $this->download = $download; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getDownload() { | public function getDownload() { | ||||
return $this->download; | return $this->download; | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0