<?php
 abstract class vB_Xml_Export { use vB_Trait_NoSerialize; protected $db; protected $productid; public function __construct($product = 'vbulletin') { $this->db = vB::getDbAssertor(); $this->productid = $product; } public static function createGUID($record, $source = 'vbulletin') { return vB_GUID::get("$source-"); } public function export($filepath, $overwrite = TRUE) { if (!$overwrite AND file_exists($filepath)) { throw new Exception('Target file already exists'); } file_put_contents($filepath, $this->getXml()); } public abstract function getXml(?vB_XML_Builder &$xml = NULL); } 