raoul2000\workflow\source\file\GraphmlLoader::collectTransitions PHP Метод

collectTransitions() приватный Метод

Extract edges defined in the graphml input file
private collectTransitions ( ) : []
Результат []
    private function collectTransitions()
    {
        $nlEdges = $this->_xp->query('//ns:edge');
        if ($nlEdges->length == 0) {
            throw new WorkflowException("no edge could be found in this workflow");
        }
        $result = [];
        for ($i = 0; $i < $nlEdges->length; $i++) {
            $currentNode = $nlEdges->item($i);
            $source = trim($this->_xp->query("@source", $currentNode)->item(0)->value);
            $target = trim($this->_xp->query("@target", $currentNode)->item(0)->value);
            if (!isset($result[$source]) || !isset($result[$source][$target])) {
                $result[$source][$target] = [];
            }
        }
        return $result;
    }