-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripting.class.php
59 lines (49 loc) · 1.25 KB
/
scripting.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
class UpdateSnippetDevice {
}
class UpdateSnippet {
/**
* all we know about the device
* @var SimpleXMLElement
*/
var $statexml;
/**
* dump $this->property->statexml
* this includes a SIMPLEXMLElement with everything we know about the device
*/
final function dump() {
unset($this->statexml->msgs);
$dom = new DOMDocument('1.0');
$dom->preserveWhitespace = true;
$dom->formatOutput = true;
$dom->loadXML($this->statexml->asXML());
print "<pre>" . htmlspecialchars($dom->saveXML()) . "</pre>";
}
function __construct() {
$this->statexml = new SimpleXMLElement('<e/>');
}
/**
* custom snippet to be sent before all standard snippets
* array of strings (each element one line)
* @return array
*/
function getPreSnippet() {
return array();
}
/**
* custom snippet to be sent after all standard snippets
* array of strings (each element one line)
* @return array
*/
function getPostSnippet() {
return array();
}
/**
* shall we send or suppress all standard snippets?
* @return boolean
*/
function sendStandardSnippets() {
return true;
}
}
?>