1 /*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Christian Stocker <chregu@php.net> |
14 | Rob Richards <rrichards@php.net> |
15 +----------------------------------------------------------------------+
16 */
17
18 #ifdef HAVE_CONFIG_H
19 #include <config.h>
20 #endif
21
22 #include "php.h"
23 #if defined(HAVE_LIBXML) && defined(HAVE_DOM)
24 #include "php_dom.h"
25 #include "dom_properties.h"
26
27 /*
28 * class DOMNotation extends DOMNode
29 *
30 * URL: https://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5431D1B9
31 * Since:
32 */
33
34 /* {{{ attribute protos, not implemented yet */
35
36 /* {{{ publicId string
37 readonly=yes
38 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-54F2B4D0
39 Since:
40 */
dom_notation_public_id_read(dom_object * obj,zval * retval)41 zend_result dom_notation_public_id_read(dom_object *obj, zval *retval)
42 {
43 DOM_PROP_NODE(xmlEntityPtr, nodep, obj);
44
45 if (nodep->ExternalID) {
46 ZVAL_STRING(retval, (char *) (nodep->ExternalID));
47 } else {
48 ZVAL_EMPTY_STRING(retval);
49 }
50
51 return SUCCESS;
52 }
53
54 /* }}} */
55
56 /* {{{ systemId string
57 readonly=yes
58 URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-E8AAB1D0
59 Since:
60 */
dom_notation_system_id_read(dom_object * obj,zval * retval)61 zend_result dom_notation_system_id_read(dom_object *obj, zval *retval)
62 {
63 DOM_PROP_NODE(xmlEntityPtr, nodep, obj);
64
65 if (nodep->SystemID) {
66 ZVAL_STRING(retval, (char *) (nodep->SystemID));
67 } else {
68 ZVAL_EMPTY_STRING(retval);
69 }
70
71 return SUCCESS;
72 }
73
74 /* }}} */
75
76 /* }}} */
77
78 #endif
79