Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F549541
PhluxVariable.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhluxVariable.php
View Options
<?php
final
class
PhluxVariable
extends
PhluxDAO
implements
PhabricatorApplicationTransactionInterface
,
PhabricatorFlaggableInterface
,
PhabricatorPolicyInterface
{
protected
$variableKey
;
protected
$variableValue
;
protected
$viewPolicy
;
protected
$editPolicy
;
protected
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
);
}
/* -( PhabricatorApplicationTransactionInterface )------------------------- */
public
function
getApplicationTransactionEditor
()
{
return
new
PhluxVariableEditor
();
}
public
function
getApplicationTransactionTemplate
()
{
return
new
PhluxTransaction
();
}
/* -( 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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 2:11 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
120769
Default Alt Text
PhluxVariable.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment