Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101663756
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
Wed, Feb 12, 14:12
Size
620 B
Mime Type
text/x-php
Expires
Fri, Feb 14, 14:12 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24208028
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