Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99417942
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
Fri, Jan 24, 09:25
Size
886 B
Mime Type
text/x-php
Expires
Sun, Jan 26, 09:25 (2 d)
Engine
blob
Format
Raw Data
Handle
23792657
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