3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /** * File summary */ /** * @copyright Voiceworks BV 2015 * @author: Martijn Klene <martijn.klene@voiceworks.com> * @since: 17-03-2015 * @category * @package * @subpackage */ class MoveAnswer extends SemParser implements Sem_ParserInterface { /** @var string */ protected $planDateOld; /** * @return bool */ public function validate() { return $this->domDocument->schemaValidate(dirname(__FILE__) . '/../../../xsd/WLRRequestAnswers.xsd'); } /** * @throws Exception * @throws NotfoundException * @throws PropelException * @throws WlrSEmException */ public function parse() { $element = $this->domDocument->firstChild; $this->type = $element->getElementsByTagName('type')->item(0)->nodeValue; $this->header = $element->getElementsByTagName('answerheader')->item(0); $this->currentTelco = $this->getTelco($this->header, 'networkOperator'); $this->recipientTelco = $this->getTelco($this->header, 'recipientTelco'); if ($this->header->getElementsByTagName('donorTelco')->length) { $this->donorTelco = $this->getTelco($this->header, 'donorTelco'); } $this->messageId = $this->header->getElementsByTagName('messageId')->item(0)->nodeValue; $this->orderNumber = $this->header->getElementsByTagName('orderNr')->item(0)->nodeValue; $this->status = $element->getElementsByTagName('status')->item(0)->nodeValue; if ($element->getElementsByTagName('remark')->length) { $this->kpnRemark = $element->getElementsByTagName('remark')->item(0)->nodeValue; } if ($element->getElementsByTagName('planDateNew')->length) { $this->planDate = $element->getElementsByTagName('planDateNew')->item(0)->nodeValue; } if ($element->getElementsByTagName('planDateOld')->length) { $this->planDateOld = $element->getElementsByTagName('planDateOld')->item(0)->nodeValue; } if ($element->getElementsByTagName("PSTNreservation")->length) { $this->parsePstnReservation($element->getElementsByTagName("PSTNreservation")->item(0)); } elseif ($element->getElementsByTagName("ISDN1reservation")->length) { $this->parseIsdn1Reservation($element->getElementsByTagName("ISDN1reservation")->item(0)); } elseif ($element->getElementsByTagName("ISDN2Areservation")->length) { $this->parseIsdn2aReservation($element->getElementsByTagName("ISDN2Areservation")->item(0)); } else { throw new NotfoundException(_('Unknow reservation type given.')); } if ($element->getElementsByTagName("nlstype")->length) { $this->nlsType = $element->getElementsByTagName("nlstype")->item(0)->nodeValue; } if ($element->getElementsByTagName("conductorPairNr")->length) { $this->conductorPairNr = $element->getElementsByTagName("conductorPairNr")->item(0)->nodeValue; } $orderNumber = explode("-", $this->messageId); $this->findWlrOrderByOrderNumber($orderNumber[1], $orderNumber[2]); if ($this->wlrOrder->getId() !== null) { $this->semWlrOrder = new SEM_WlrOrder($this->wlrOrder); $this->semWlrOrder->Orderid = $this->orderNumber; $this->semWlrOrder->PlannedDate = $this->planDate; $this->semWlrOrder->Kpnremarks = $this->kpnRemark; $this->wlrXmlLog->setWlrorderid($this->wlrOrder->getId()); $this->wlrXmlLog->save(); switch ($this->status) { case '01': $this->semWlrOrder->Wlrorderstatusid = 5; $this->wlrOrder = $this->semWlrOrder->update($this->isDebug); $this->logOrderStatus($this->wlrOrder); self::updateOldOrder($this->wlrOrder, 5); $mailTemplate = 'ORDER_PLANNED'; break; case '02': $this->semWlrOrder->Wlrorderstatusid = 6; $this->wlrOrder = $this->semWlrOrder->update($this->isDebug); $this->wlrBilling->updateBillingDates($this->wlrOrder, strtotime($this->planDate)); self::updateOldOrder($this->wlrOrder, 6); $mailTemplate = 'ORDER_PLANNED_OTHERDATE'; break; default: $this->semWlrOrder->Wlrorderstatusid = 20; $this->semWlrOrder->Failed = 1; $this->wlrOrder = $this->semWlrOrder->update(); $mailTemplate = 'ORDER_DENIED'; $this->wlrBilling->removeInstances($this->wlrOrder); break; } $this->logOrderStatus($this->wlrOrder); self::mailCustomer( $mailTemplate, $this->wlrOrder->getWlraccount()->getAccountid(), $this->wlrOrder->getId(), $this->isDebug ); } else { throw new NotfoundException(_('Unable to find a WLR order to move')); } } }
based on kuLmD
Output for 5.4.0 - 7.2.0
Fatal error: Class 'SemParser' not found in /in/PEaSS on line 15
Process exited with code 255.