示例#1
0
 /**
  * Get user agent information as XML
  * @param \DOMElement $node
  */
 public static function getUserAgentXML($node)
 {
     if ($ua = self::getUserAgent()) {
         DOM::array2domAttr($node, $ua);
     }
     if ($uac = self::getUserAgentClass()) {
         $node->setAttribute('uaClass', $uac);
     }
 }
示例#2
0
 /**
  * Get plugins information as XML
  * @param \DOMElement|\DOMNode $node
  */
 public static function getPluginsXML($node)
 {
     self::smartPluginsEnable();
     self::fillMissingReq();
     $pluginsNode = $node->appendChild($node->ownerDocument->createElement('plugins'));
     DOM::array2domAttr($pluginsNode, self::$pluginsData);
     $provisionsNode = $node->appendChild($node->ownerDocument->createElement('provisions'));
     DOM::array2domAttr($provisionsNode, self::$provisions);
 }
示例#3
0
 /**
  * Add console data to output XML
  * @param \DOMNode|\DOMElement $node
  * @param bool $standalone
  * @return string
  */
 public static function debugXML($node, $standalone = false)
 {
     self::init();
     $node->setAttribute('debug', self::$enabled ? '1' : '0');
     $node->setAttribute('debugConsole', self::$console);
     $node->setAttribute('caches', self::$caches ? '1' : '0');
     if (!self::$console) {
         return;
     }
     /** @var $debugNode \DOMElement */
     $debugNode = $node->appendChild($node->ownerDocument->createElement('debug'));
     Libs\XML\DOM::array2domAttr($debugNode, self::$output, true);
     if ($standalone) {
         $node->setAttribute('standalone', 1);
     }
 }