summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2002-08-22 09:54:06 +0000
committerChristian Stocker <chregu@php.net>2002-08-22 09:54:06 +0000
commit47d8e08b11e2de45fc3de1a966b4f286b42995fe (patch)
tree1ad7fdc9e7538c1f67265c7b3bfc6618d17cd96a
parent0ea1dda8cde00bba9b2eea0fd871f5488b337a8b (diff)
downloadphp-git-47d8e08b11e2de45fc3de1a966b4f286b42995fe.tar.gz
@ - Added xslt_backend_version() and xslt_backend_name() for getting
@ information about the processor backend. (chregu)
-rw-r--r--ext/xslt/php_sablot.h2
-rw-r--r--ext/xslt/sablot.c22
2 files changed, 24 insertions, 0 deletions
diff --git a/ext/xslt/php_sablot.h b/ext/xslt/php_sablot.h
index 97e2dc6391..513c6287ea 100644
--- a/ext/xslt/php_sablot.h
+++ b/ext/xslt/php_sablot.h
@@ -62,6 +62,8 @@ PHP_FUNCTION(xslt_process);
PHP_FUNCTION(xslt_error);
PHP_FUNCTION(xslt_errno);
PHP_FUNCTION(xslt_free);
+PHP_FUNCTION(xslt_backend_version);
+PHP_FUNCTION(xslt_backend_name);
struct scheme_handlers {
zval *get_all;
diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c
index 7517dd870e..7cc8661c8a 100644
--- a/ext/xslt/sablot.c
+++ b/ext/xslt/sablot.c
@@ -87,6 +87,8 @@ function_entry xslt_functions[] = {
PHP_FE(xslt_error, NULL)
PHP_FE(xslt_errno, NULL)
PHP_FE(xslt_free, NULL)
+ PHP_FE(xslt_backend_version, NULL)
+ PHP_FE(xslt_backend_name, NULL)
{NULL, NULL, NULL}
};
/* }}} */
@@ -608,6 +610,26 @@ PHP_FUNCTION(xslt_free)
}
/* }}} */
+/* {{{ proto void xslt_backend_version()
+ Returns the version number of Sablotron (if available) */
+PHP_FUNCTION(xslt_backend_version)
+{
+#ifdef SAB_VERSION
+ RETURN_STRING(SAB_VERSION,1);
+#else
+ RETURN_FALSE;
+#endif
+}
+/* }}} */
+
+/* {{{ proto void xslt_backend_name()
+ Returns the name of the Backend (here "Sablotron")*/
+PHP_FUNCTION(xslt_backend_name)
+{
+ RETURN_STRING("Sablotron",1);
+}
+/* }}} */
+
/* {{{ free_processor()
Free an XSLT processor */
static void free_processor(zend_rsrc_list_entry *rsrc TSRMLS_DC)