Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
678 B · 30 lines
PHP
12345678910111213141516171819202122232425262728293031<?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; }}