Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90757359
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
Mon, Nov 4, 11:54
Size
713 B
Mime Type
text/x-php
Expires
Wed, Nov 6, 11:54 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22130193
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