/** * Load PhpFlo graph definition from file. * * @param string $file * @return \PhpFlo\Network */ public static function loadFile($file) { $graph = Graph::loadFile($file); return Network::create($graph); }
public function testLoadFile() { $network = Network::loadFile(__DIR__ . '/../../../examples/linecount/count.json'); $readFile = $network->getNode('ReadFile'); $this->assertEquals('ReadFile', $readFile['id']); }