next = $next; return $next; } /** * Subclasses must override this method to provide their own checks. * * @param SimpleXMLElement|false|string $data * * @return int * @throws XmlApiException */ public function process($data) { if (!$this->next) { return $data; } return $this->next->process($data); } }