Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79890924
PhabricatorLegacyEdgeType.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, Aug 28, 20:05
Size
2 KB
Mime Type
text/x-php
Expires
Fri, Aug 30, 20:05 (2 d)
Engine
blob
Format
Raw Data
Handle
20248478
Attached To
rPH Phabricator
PhabricatorLegacyEdgeType.php
View Options
<?php
/**
* Supports legacy edges. Do not use or extend this class!
*
* TODO: Move all edge constants out of @{class:PhabricatorEdgeConfig}, then
* throw this away.
*/
final
class
PhabricatorLegacyEdgeType
extends
PhabricatorEdgeType
{
private
$edgeConstant
;
private
$inverseEdgeConstant
;
private
$shouldPreventCycles
;
private
$strings
;
public
function
getEdgeConstant
()
{
return
$this
->
edgeConstant
;
}
public
function
getInverseEdgeConstant
()
{
return
$this
->
inverseEdgeConstant
;
}
public
function
shouldPreventCycles
()
{
return
$this
->
shouldPreventCycles
;
}
public
function
setEdgeConstant
(
$edge_constant
)
{
$this
->
edgeConstant
=
$edge_constant
;
return
$this
;
}
public
function
setInverseEdgeConstant
(
$inverse_edge_constant
)
{
$this
->
inverseEdgeConstant
=
$inverse_edge_constant
;
return
$this
;
}
public
function
setShouldPreventCycles
(
$should_prevent_cycles
)
{
$this
->
shouldPreventCycles
=
$should_prevent_cycles
;
return
$this
;
}
public
function
setStrings
(
array
$strings
)
{
$this
->
strings
=
$strings
;
return
$this
;
}
private
function
getString
(
$idx
,
array
$argv
)
{
array_unshift
(
$argv
,
idx
(
$this
->
strings
,
$idx
,
''
));
// TODO: Burn this class in a fire. Just hiding this from lint for now.
$pht_func
=
'pht'
;
return
call_user_func_array
(
$pht_func
,
$argv
);
}
public
function
getTransactionAddString
(
$actor
,
$add_count
,
$add_edges
)
{
$args
=
func_get_args
();
return
$this
->
getString
(
0
,
$args
);
}
public
function
getTransactionRemoveString
(
$actor
,
$rem_count
,
$rem_edges
)
{
$args
=
func_get_args
();
return
$this
->
getString
(
1
,
$args
);
}
public
function
getTransactionEditString
(
$actor
,
$total_count
,
$add_count
,
$add_edges
,
$rem_count
,
$rem_edges
)
{
$args
=
func_get_args
();
return
$this
->
getString
(
2
,
$args
);
}
public
function
getFeedAddString
(
$actor
,
$object
,
$add_count
,
$add_edges
)
{
$args
=
func_get_args
();
return
$this
->
getString
(
3
,
$args
);
}
public
function
getFeedRemoveString
(
$actor
,
$object
,
$rem_count
,
$rem_edges
)
{
$args
=
func_get_args
();
return
$this
->
getString
(
3
,
$args
);
}
public
function
getFeedEditString
(
$actor
,
$object
,
$total_count
,
$add_count
,
$add_edges
,
$rem_count
,
$rem_edges
)
{
$args
=
func_get_args
();
return
$this
->
getString
(
3
,
$args
);
}
}
Event Timeline
Log In to Comment