diff --git a/ext/xslt/php_sablot.h b/ext/xslt/php_sablot.h index 97e2dc6391f..513c6287ead 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 7517dd870e5..7cc8661c8ac 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)