Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92037647
PhluxVariable.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
Sat, Nov 16, 20:14
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Nov 18, 20:14 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22367006
Attached To
rPH Phabricator
PhluxVariable.php
View Options
<?php
final
class
PhluxVariable
extends
PhluxDAO
implements
PhabricatorFlaggableInterface
,
PhabricatorPolicyInterface
{
protected
$variableKey
;
protected
$variableValue
;
protected
$viewPolicy
;
protected
$editPolicy
;
public
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_AUX_PHID
=>
true
,
self
::
CONFIG_SERIALIZATION
=>
array
(
'variableValue'
=>
self
::
SERIALIZATION_JSON
,
),
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'variableKey'
=>
'text64'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_key'
=>
array
(
'columns'
=>
array
(
'variableKey'
),
'unique'
=>
true
,
),
),
)
+
parent
::
getConfiguration
();
}
public
function
generatePHID
()
{
return
PhabricatorPHID
::
generateNewPHID
(
PhluxVariablePHIDType
::
TYPECONST
);
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
);
}
public
function
getPolicy
(
$capability
)
{
switch
(
$capability
)
{
case
PhabricatorPolicyCapability
::
CAN_VIEW
:
return
$this
->
viewPolicy
;
case
PhabricatorPolicyCapability
::
CAN_EDIT
:
return
$this
->
editPolicy
;
}
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
false
;
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
null
;
}
}
Event Timeline
Log In to Comment