2003-06-06 01:06:52 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2014-09-20 00:33:14 +08:00
|
|
|
| PHP Version 7 |
|
2003-06-06 01:06:52 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2016-01-02 01:19:27 +08:00
|
|
|
| Copyright (c) 1997-2016 The PHP Group |
|
2003-06-06 01:06:52 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2003-06-06 01:06:52 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 20:51:34 +08:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2003-06-06 01:06:52 +08:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Authors: Christian Stocker <chregu@php.net> |
|
|
|
|
| Rob Richards <rrichards@php.net> |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "php.h"
|
2003-08-22 23:04:29 +08:00
|
|
|
#if HAVE_LIBXML && HAVE_DOM
|
2003-06-06 01:06:52 +08:00
|
|
|
#include "php_dom.h"
|
|
|
|
|
|
|
|
/*
|
2015-01-03 17:22:58 +08:00
|
|
|
* class DOMNotation extends DOMNode
|
2003-06-06 01:06:52 +08:00
|
|
|
*
|
|
|
|
* URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5431D1B9
|
2015-01-03 17:22:58 +08:00
|
|
|
* Since:
|
2003-06-06 01:06:52 +08:00
|
|
|
*/
|
|
|
|
|
2007-09-28 02:00:48 +08:00
|
|
|
const zend_function_entry php_dom_notation_class_functions[] = {
|
2011-07-25 19:35:02 +08:00
|
|
|
PHP_FE_END
|
2003-06-06 01:06:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* {{{ attribute protos, not implemented yet */
|
|
|
|
|
2015-01-03 17:22:58 +08:00
|
|
|
/* {{{ publicId string
|
|
|
|
readonly=yes
|
2003-06-06 01:06:52 +08:00
|
|
|
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-54F2B4D0
|
2015-01-03 17:22:58 +08:00
|
|
|
Since:
|
2003-06-06 01:06:52 +08:00
|
|
|
*/
|
2014-12-14 06:06:14 +08:00
|
|
|
int dom_notation_public_id_read(dom_object *obj, zval *retval)
|
2003-06-06 01:06:52 +08:00
|
|
|
{
|
2014-04-16 02:30:41 +08:00
|
|
|
xmlEntityPtr nodep = (xmlEntityPtr) dom_object_get_node(obj);
|
2004-02-16 21:06:33 +08:00
|
|
|
|
|
|
|
if (nodep == NULL) {
|
2014-12-14 06:06:14 +08:00
|
|
|
php_dom_throw_error(INVALID_STATE_ERR, 0);
|
2004-02-16 21:06:33 +08:00
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
2006-03-04 04:15:10 +08:00
|
|
|
if (nodep->ExternalID) {
|
2014-04-16 02:30:41 +08:00
|
|
|
ZVAL_STRING(retval, (char *) (nodep->ExternalID));
|
2003-06-06 01:06:52 +08:00
|
|
|
} else {
|
2014-04-16 02:30:41 +08:00
|
|
|
ZVAL_EMPTY_STRING(retval);
|
2003-06-06 01:06:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* }}} */
|
|
|
|
|
2015-01-03 17:22:58 +08:00
|
|
|
/* {{{ systemId string
|
|
|
|
readonly=yes
|
2003-06-06 01:06:52 +08:00
|
|
|
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-E8AAB1D0
|
2015-01-03 17:22:58 +08:00
|
|
|
Since:
|
2003-06-06 01:06:52 +08:00
|
|
|
*/
|
2014-12-14 06:06:14 +08:00
|
|
|
int dom_notation_system_id_read(dom_object *obj, zval *retval)
|
2003-06-06 01:06:52 +08:00
|
|
|
{
|
2014-04-16 02:30:41 +08:00
|
|
|
xmlEntityPtr nodep = (xmlEntityPtr) dom_object_get_node(obj);
|
2004-02-16 21:06:33 +08:00
|
|
|
|
|
|
|
if (nodep == NULL) {
|
2014-12-14 06:06:14 +08:00
|
|
|
php_dom_throw_error(INVALID_STATE_ERR, 0);
|
2004-02-16 21:06:33 +08:00
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
2003-06-06 01:06:52 +08:00
|
|
|
if (nodep->SystemID) {
|
2014-04-16 02:30:41 +08:00
|
|
|
ZVAL_STRING(retval, (char *) (nodep->SystemID));
|
2003-06-06 01:06:52 +08:00
|
|
|
} else {
|
2014-04-16 02:30:41 +08:00
|
|
|
ZVAL_EMPTY_STRING(retval);
|
2003-06-06 01:06:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* }}} */
|
|
|
|
|
2008-08-14 16:39:05 +08:00
|
|
|
/* }}} */
|
|
|
|
|
2003-08-22 23:04:29 +08:00
|
|
|
#endif
|
2008-08-14 16:39:05 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* End:
|
|
|
|
* vim600: noet sw=4 ts=4 fdm=marker
|
|
|
|
* vim<600: noet sw=4 ts=4
|
|
|
|
*/
|