Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93179141
PhabricatorConfigDatabaseSource.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
Tue, Nov 26, 19:35
Size
620 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 19:35 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22588027
Attached To
rPH Phabricator
PhabricatorConfigDatabaseSource.php
View Options
<?php
final
class
PhabricatorConfigDatabaseSource
extends
PhabricatorConfigProxySource
{
public
function
__construct
(
$namespace
)
{
$config
=
$this
->
loadConfig
(
$namespace
);
$this
->
setSource
(
new
PhabricatorConfigDictionarySource
(
$config
));
}
public
function
isWritable
()
{
// While this is writable, writes occur through the Config application.
return
false
;
}
private
function
loadConfig
(
$namespace
)
{
$objects
=
id
(
new
PhabricatorConfigEntry
())->
loadAllWhere
(
'namespace = %s AND isDeleted = 0'
,
$namespace
);
return
mpull
(
$objects
,
'getValue'
,
'getConfigKey'
);
}
}
Event Timeline
Log In to Comment