1
0
mirror of https://github.com/mbirth/tcl_update_db.git synced 2024-11-10 07:16:46 +00:00
tcl_update_db/lib/TclUpdates/GotuObject.php

42 lines
684 B
PHP
Raw Normal View History

<?php
namespace TclUpdates;
class GotuObject
{
private $attrs = array();
public function __construct()
{
}
2017-12-10 15:55:02 +00:00
public function __isset($attr)
{
return array_key_exists($attr, $this->attrs);
}
public function __get($attr)
{
if (!$this->__isset($attr)) {
return null;
}
return $this->attrs[$attr];
}
public function getAttrs()
{
return $this->attrs;
}
public static function fromXmlParser(XmlParser $xp)
{
if (!$xp->validateGOTU()) {
2017-12-10 15:55:02 +00:00
return null;
}
$g = new self();
$g->attrs = $xp->getAttrs();
return $g;
}
}