public function getNodeById($id) { if (!isset($this->nodes[$id])) { return; } return $this->nodes[$id]; }