1
0

Started actual parsing of XML into PHP objects.

This commit is contained in:
2017-11-22 00:15:32 +01:00
parent 2fe04b0edd
commit 304dc11190
3 changed files with 127 additions and 0 deletions

26
lib/TclUpdates/GotuObject.php Executable file
View File

@@ -0,0 +1,26 @@
<?php
namespace TclUpdates;
class GotuObject
{
private $attrs = array();
public function __construct()
{
}
public static function fromXmlParser(XmlParser $xp)
{
if (!$xp->validateGOTU()) {
return false;
}
$g = new self();
$g->attrs['type'] = $xp->getAttr('type');
$g->attrs['fv'] = $xp->getAttr('fv');
$g->attrs['tv'] = $xp->getAttr('tv');
$g->attrs['time'] = $xp->getReleaseTime();
return $g;
}
}