Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98083113
AphrontSite.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jan 9, 14:53
Size
886 B
Mime Type
text/x-php
Expires
Sat, Jan 11, 14:53 (2 d)
Engine
blob
Format
Raw Data
Handle
23496911
Attached To
rPH Phabricator
AphrontSite.php
View Options
<?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
Log In to Comment