/** * 遇到错误,错误解决后重新尝试执行 */ public function retry() { if (self::$retryTimes >= 10) { return; } self::$retryTimes++; $this->action->cleanData(); Model::rollBack(); $this->execute(); }
/** * 输出xml */ protected static function xml() { \header('Content-type: application/xml; charset=' . \Config::CHARSET); $header = Error::prepareHeader(); $header = array_merge($header, Action::getHeaderStore()); $header['data'] = Action::getDataStore(); $content = self::array2xml($header, new \SimpleXMLElement('<root></root>'))->asXML(); return $content; }