Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/site/AphrontSite.php
Show All 9 Lines | abstract class AphrontSite extends Phobject { | ||||
abstract public function getRoutingMaps(); | abstract public function getRoutingMaps(); | ||||
public function new404Controller(AphrontRequest $request) { | public function new404Controller(AphrontRequest $request) { | ||||
return new Phabricator404Controller(); | return new Phabricator404Controller(); | ||||
} | } | ||||
protected function isHostMatch($host, array $uris) { | protected function isHostMatch($host, array $uris) { | ||||
foreach ($uris as $uri) { | foreach ($uris as $uri) { | ||||
if (!strlen($uri)) { | if (!phutil_nonempty_string($uri)) { | ||||
continue; | continue; | ||||
} | } | ||||
$domain = id(new PhutilURI($uri))->getDomain(); | $domain = id(new PhutilURI($uri))->getDomain(); | ||||
if ($domain === $host) { | if ($domain === $host) { | ||||
return true; | return true; | ||||
} | } | ||||
Show All 18 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