Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91170818
CelerityResourceGraph.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
Fri, Nov 8, 15:02
Size
678 B
Mime Type
text/x-php
Expires
Sun, Nov 10, 15:02 (2 d)
Engine
blob
Format
Raw Data
Handle
22201615
Attached To
rPH Phabricator
CelerityResourceGraph.php
View Options
<?php
final
class
CelerityResourceGraph
extends
AbstractDirectedGraph
{
private
$resourceGraph
=
array
();
private
$graphSet
=
false
;
protected
function
loadEdges
(
array
$nodes
)
{
if
(!
$this
->
graphSet
)
{
throw
new
PhutilInvalidStateException
(
'setResourceGraph'
);
}
$graph
=
$this
->
getResourceGraph
();
$edges
=
array
();
foreach
(
$nodes
as
$node
)
{
$edges
[
$node
]
=
idx
(
$graph
,
$node
,
array
());
}
return
$edges
;
}
public
function
setResourceGraph
(
array
$graph
)
{
$this
->
resourceGraph
=
$graph
;
$this
->
graphSet
=
true
;
return
$this
;
}
private
function
getResourceGraph
()
{
return
$this
->
resourceGraph
;
}
}
Event Timeline
Log In to Comment