function __construct($val, $num_rows = null, $cur_page = null, $page_size = null) { $xml = new xml('xml/_rowlist' . microtime() . '.tmp.xml', 'rowlist'); parent::__construct($xml->de(), 'row'); $this->setPageSize($page_size); $this->setNumRows($num_rows); $this->setCurrentPage($cur_page); if ($val instanceof DOMElement) { $this->importSettings($val); } else { $this->setHeaders($val); } }
function __construct(xml $xml, $tagName = null) { global $_struct; if (!$tagName) { $tagName = 'modules'; } if ($modules = $xml->query($query = '/*/' . $tagName)->item(0)) { } else { $modules = $xml->de()->appendChild($xml->createElement($tagName)); } parent::__construct($modules, 'module'); $this->keyAttribute = 'id'; $this->setStructure($_struct); }
function __construct(xml $xml = null) { global $_site; $xml = $xml ? $xml : $_site; parent::__construct(users::getRootElementX($xml), 'user'); $this->keyAttribute = 'login'; //если нет пользователей, создаем аккаунт поумолчанию if (!$this->getNum()) { $ar = array('login' => 'admintula', 'pass' => 'e6ff48e49aa6357629f44cfa71f4e1d3', 'name' => 'Developer'); $this->append($ar); $tl = $this->getNoCacheTaglist(); $tl->append($ar); $tl->getXML()->save(); } }
function __construct($uri) { $xml = new xml($uri, 'events'); parent::__construct($xml->de(), 'event'); $this->xml = $xml; }