Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99851103
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
Sun, Jan 26, 23:14
Size
713 B
Mime Type
text/x-php
Expires
Tue, Jan 28, 23:14 (2 d)
Engine
blob
Format
Raw Data
Handle
23835059
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
Exception
(
"Call setResourceGraph before loading the graph!"
);
}
$graph
=
$this
->
getResourceGraph
();
$edges
=
array
();
foreach
(
$nodes
as
$node
)
{
$edges
[
$node
]
=
idx
(
$graph
,
$node
,
array
());
}
return
$edges
;
}
final
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