Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890121
PhabricatorResourceSite.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
944 B
Referenced Files
None
Subscribers
None
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
(
!
phutil_nonempty_string
(
$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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 13:05 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124893
Default Alt Text
PhabricatorResourceSite.php (944 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment