Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106113721
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
Sat, Mar 22, 14:11
Size
713 B
Mime Type
text/x-php
Expires
Mon, Mar 24, 14:11 (2 d)
Engine
blob
Format
Raw Data
Handle
25097307
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