示例#1
0
include_once "{$serverRoot}/classes/ImageShared.php";
define("DEFAULT_NEVP_COUNTRY", "United States of America");
// Check to see if included classes match the current schema version.
$uptodate = true;
$testOcc = new OmOccurrences();
if (!$testOcc->checkSchema()) {
    echo "[Warning: classes/OmOccurrences.php does not support the Symbiota schema version.]\n";
    $uptodate = false;
}
$testOccDet = new OmOccurDeterminations();
if (!$testOccDet->checkSchema()) {
    echo "[Warning: classes/OmOccurDeterminations.php does not support the Symbiota schema version.]\n";
    $uptodate = false;
}
$testImg = new ImageShared();
if (!$testImg->checkSchema()) {
    echo "[Warning: classes/ImageShared.php does not support the Symbiota schema version.]\n";
    $uptodate = false;
}
if (!$uptodate) {
    echo "[Warning: Ingest of data may fail.  Contact a Symbiota developer.]\n";
}
if (!class_exists('Result')) {
    /**
     * To record and sumarize the results of processing an xml file. 
     * 
     * @author mole
     *
     */
    class Result
    {
示例#2
0
//$classes['AgentManager'] = 'classes/AgentManager.php';
//$classes['Agent'] = 'classes/AgentManager.php';
foreach ($classes as $class => $file) {
    include_once "{$serverRoot}/{$file}";
    $t = null;
    // Instantiate an instance of the class to test.
    switch ($class) {
        case "OmOccurrences":
            $t = new OmOccurrences();
            break;
        case "OmOccurDeterminations":
            $t = new OmOccurDeterminations();
            break;
        case "ImageShared":
            $t = new ImageShared();
            break;
    }
    if ($t != null) {
        if (!$t->checkSchema()) {
            echo "[Warning: {$class} in {$file} does not match the Symbiota schema version.]\n";
            $failure = true;
        } else {
            echo "{$class}: Pass\n";
        }
    }
}
if (!$failure) {
    echo "Done. All listed classes support the current schema.\n";
} else {
    echo "Done. There were errors.\n";
}