$xmlw->startElement('Remarks'); $xmlw->text($Model->getRemarks()); $xmlw->endElement(); } } $xmlw->endElement(); $xmlw->flush(); ob_flush(); flush(); } /* @var $SpecialModels array(Model) */ $SpecialModels = array(); /* @var $Model Model */ foreach ($Models as $Model) { if ($ModelID && $Model->getID() !== $ModelID) { continue; } if ($Model->getFirstName() == 'Interviews' || $Model->getFirstName() == 'Promotions' || $Model->getFirstName() == 'VIP') { $SpecialModels[] = $Model; continue; } XmlOutputModel($Model, $TaggedOnly); } foreach ($SpecialModels as $Model) { XmlOutputModel($Model, $TaggedOnly); } $xmlw->endElement(); $xmlw->endDocument(); ob_end_flush(); flush(); exit;
ob_flush(); flush(); } if (!is_null($Date) && (!is_null($UpdatesPic) || !is_null($UpdatesVid))) { $mPic = preg_match_all('/(?<ModelName>[A-Z]+)(?<SetName>[0-9]+)/i', $UpdatesPic, $matchesPic, PREG_SPLIT_NO_EMPTY); $mVid = preg_match_all('/(?<ModelName>[A-Z]+)(?<SetName>[0-9]+)/i', $UpdatesVid, $matchesVid, PREG_SPLIT_NO_EMPTY); foreach ($matchesPic["ModelName"] as $mPict) { $mInDB = Model::Filter($Models, NULL, NULL, NULL, $mPict); $name = preg_match('/^(?<FirstName>[A-Z]+[a-z]*)(?<LastNameInitial>[A-Z])??$/', $mPict, $splitName); $fname = $name ? $splitName['FirstName'] : NULL; $lname = $name && array_key_exists('LastNameInitial', $splitName) ? $splitName['LastNameInitial'] : NULL; $mInDB = $mInDB ? $mInDB[0] : new Model(NULL, $fname, $lname); /* @var $ModelInDB Model */ foreach ($Models as $ModelInDB) { $mInDB = $ModelInDB->GetShortName() == $mPict ? $ModelInDB : new Model(NULL, $mPict); XmlOutputModel($mInDB); } /* foreach($Models as $ModelInDB) { var_dump($mPic); var_dump($mInDB); break; }*/ } // var_dump($matchesPic); // var_dump($matchesVid); // die(); } /* @var $Model Model foreach ($Models as $Model)