Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93897045
PhabricatorResourceSite.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
Mon, Dec 2, 08:33
Size
928 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 08:33 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22721033
Attached To
rPH Phabricator
PhabricatorResourceSite.php
View Options
<?php
final
class
PhabricatorResourceSite
extends
PhabricatorSite
{
public
function
getDescription
()
{
return
pht
(
'Serves static resources like images, CSS and JS.'
);
}
public
function
getPriority
()
{
return
2000
;
}
public
function
newSiteForRequest
(
AphrontRequest
$request
)
{
$host
=
$request
->
getHost
();
$uri
=
PhabricatorEnv
::
getEnvConfig
(
'security.alternate-file-domain'
);
if
(!
strlen
(
$uri
))
{
return
null
;
}
if
(
$this
->
isHostMatch
(
$host
,
array
(
$uri
)))
{
return
new
PhabricatorResourceSite
();
}
return
null
;
}
public
function
getRoutingMaps
()
{
$applications
=
PhabricatorApplication
::
getAllInstalledApplications
();
$maps
=
array
();
foreach
(
$applications
as
$application
)
{
$maps
[]
=
$this
->
newRoutingMap
()
->
setApplication
(
$application
)
->
setRoutes
(
$application
->
getResourceRoutes
());
}
return
$maps
;
}
}
Event Timeline
Log In to Comment