Started actual parsing of XML into PHP objects.
This commit is contained in:
26
lib/TclUpdates/GotuObject.php
Executable file
26
lib/TclUpdates/GotuObject.php
Executable 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user