@ - Added xslt_backend_version() and xslt_backend_name() for getting

@   information about the processor backend. (chregu)
This commit is contained in:
Christian Stocker 2002-08-22 09:54:06 +00:00
parent 0ea1dda8cd
commit 47d8e08b11
2 changed files with 24 additions and 0 deletions

View File

@ -62,6 +62,8 @@ PHP_FUNCTION(xslt_process);
PHP_FUNCTION(xslt_error); PHP_FUNCTION(xslt_error);
PHP_FUNCTION(xslt_errno); PHP_FUNCTION(xslt_errno);
PHP_FUNCTION(xslt_free); PHP_FUNCTION(xslt_free);
PHP_FUNCTION(xslt_backend_version);
PHP_FUNCTION(xslt_backend_name);
struct scheme_handlers { struct scheme_handlers {
zval *get_all; zval *get_all;

View File

@ -87,6 +87,8 @@ function_entry xslt_functions[] = {
PHP_FE(xslt_error, NULL) PHP_FE(xslt_error, NULL)
PHP_FE(xslt_errno, NULL) PHP_FE(xslt_errno, NULL)
PHP_FE(xslt_free, NULL) PHP_FE(xslt_free, NULL)
PHP_FE(xslt_backend_version, NULL)
PHP_FE(xslt_backend_name, NULL)
{NULL, NULL, 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_processor()
Free an XSLT processor */ Free an XSLT processor */
static void free_processor(zend_rsrc_list_entry *rsrc TSRMLS_DC) static void free_processor(zend_rsrc_list_entry *rsrc TSRMLS_DC)