protected function parseIntermediateCatchEvent($id, \DOMElement $el, BusinessProcessBuilder $builder) { foreach ($this->xpath->query('m:messageEventDefinition', $el) as $messageElement) { $message = $this->messages[$messageElement->getAttribute('messageRef')]; return $builder->intermediateMessageCatchEvent($id, $message, $el->getAttribute('name')); } foreach ($this->xpath->query('m:signalEventDefinition', $el) as $signalElement) { $signal = $this->signals[$signalElement->getAttribute('signalRef')]; return $builder->intermediateSignalCatchEvent($id, $signal, $el->getAttribute('name')); } foreach ($this->xpath->query('m:timerEventDefinition', $el) as $timerElement) { foreach ($this->xpath->query('m:timeDate', $timerElement) as $dateElement) { $date = trim($dateElement->textContent); return $builder->intermediateTimerDateEvent($id, $date, $el->getAttribute('name')); } foreach ($this->xpath->query('m:timeDuration', $timerElement) as $durationElement) { $duration = trim($durationElement->textContent); return $builder->intermediateTimerDurationEvent($id, $duration, $el->getAttribute('name')); } } foreach ($this->xpath->query('m:linkEventDefinition', $el) as $def) { $link = $def->getAttribute('name'); return $builder->intermediateLinkCatchEvent($id, $link, $el->getAttribute('name')); } return $builder->intermediateNoneEvent($id, $el->getAttribute('name')); }