Page MenuHomec4science

AphrontSite.php
No OneTemporary

File Metadata

Created
Thu, Jan 9, 14:53

AphrontSite.php

<?php
abstract class AphrontSite extends Phobject {
abstract public function getPriority();
abstract public function getDescription();
abstract public function shouldRequireHTTPS();
abstract public function newSiteForRequest(AphrontRequest $request);
abstract public function getRoutingMaps();
protected function isHostMatch($host, array $uris) {
foreach ($uris as $uri) {
if (!strlen($uri)) {
continue;
}
$domain = id(new PhutilURI($uri))->getDomain();
if ($domain === $host) {
return true;
}
}
return false;
}
protected function newRoutingMap() {
return id(new AphrontRoutingMap())
->setSite($this);
}
final public static function getAllSites() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
->setSortMethod('getPriority')
->execute();
}
}

Event Timeline