]> granicus.if.org Git - php/commitdiff
@ - Added xslt_backend_version() and xslt_backend_name() for getting
authorChristian Stocker <chregu@php.net>
Thu, 22 Aug 2002 09:54:06 +0000 (09:54 +0000)
committerChristian Stocker <chregu@php.net>
Thu, 22 Aug 2002 09:54:06 +0000 (09:54 +0000)
@   information about the processor backend. (chregu)

ext/xslt/php_sablot.h
ext/xslt/sablot.c

index 97e2dc6391f9ccbbb52502d9a342b8763cf6ef0e..513c6287ead13e3a1b290d03c39aa90bc6d32cfc 100644 (file)
@@ -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;
index 7517dd870e5c3ea7f6726fdcecd5cb2e04a86ca8..7cc8661c8ac2556db73df48f5e9d81ff75342593 100644 (file)
@@ -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)