Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80666099
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
Sun, Sep 1, 23:44
Size
620 B
Mime Type
text/x-php
Expires
Tue, Sep 3, 23:44 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20418878
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