Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
Show First 20 Lines • Show All 442 Lines • ▼ Show 20 Lines | /* -( Accessing Request Data )--------------------------------------------- */ | ||||
public function setCookiePrefix($prefix) { | public function setCookiePrefix($prefix) { | ||||
$this->cookiePrefix = $prefix; | $this->cookiePrefix = $prefix; | ||||
return $this; | return $this; | ||||
} | } | ||||
private function getPrefixedCookieName($name) { | private function getPrefixedCookieName($name) { | ||||
if (strlen($this->cookiePrefix)) { | if (phutil_nonempty_string($this->cookiePrefix)) { | ||||
return $this->cookiePrefix.'_'.$name; | return $this->cookiePrefix.'_'.$name; | ||||
} else { | } else { | ||||
return $name; | return $name; | ||||
} | } | ||||
} | } | ||||
public function getCookie($name, $default = null) { | public function getCookie($name, $default = null) { | ||||
$name = $this->getPrefixedCookieName($name); | $name = $this->getPrefixedCookieName($name); | ||||
▲ Show 20 Lines • Show All 511 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