Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93907296
PhabricatorConfigEntry.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, 10:24
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 4, 10:24 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22722595
Attached To
rPH Phabricator
PhabricatorConfigEntry.php
View Options
<?php
final
class
PhabricatorConfigEntry
extends
PhabricatorConfigEntryDAO
implements
PhabricatorPolicyInterface
{
protected
$namespace
;
protected
$configKey
;
protected
$value
;
protected
$isDeleted
;
public
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_AUX_PHID
=>
true
,
self
::
CONFIG_SERIALIZATION
=>
array
(
'value'
=>
self
::
SERIALIZATION_JSON
,
),
)
+
parent
::
getConfiguration
();
}
public
function
generatePHID
()
{
return
PhabricatorPHID
::
generateNewPHID
(
PhabricatorConfigPHIDTypeConfig
::
TYPECONST
);
}
public
static
function
loadConfigEntry
(
$key
)
{
$config_entry
=
id
(
new
PhabricatorConfigEntry
())
->
loadOneWhere
(
'configKey = %s AND namespace = %s'
,
$key
,
'default'
);
if
(!
$config_entry
)
{
$config_entry
=
id
(
new
PhabricatorConfigEntry
())
->
setConfigKey
(
$key
)
->
setNamespace
(
'default'
);
}
return
$config_entry
;
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
);
}
public
function
getPolicy
(
$capability
)
{
return
PhabricatorPolicies
::
POLICY_ADMIN
;
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
false
;
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
null
;
}
}
Event Timeline
Log In to Comment