Esempio n. 1
0
    php_info_print_table_row(2, "Session Support", "enabled" );
#endif
    php_info_print_table_row(2, "extension Version", MSGPACK_EXTENSION_VERSION);
    php_info_print_table_row(2, "header Version", MSGPACK_VERSION);
    php_info_print_table_end();

    DISPLAY_INI_ENTRIES();
}

zend_module_entry msgpack_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    "msgpack",
    msgpack_functions,
    ZEND_MINIT(msgpack),
    ZEND_MSHUTDOWN(msgpack),
    NULL,
    NULL,
    ZEND_MINFO(msgpack),
#if ZEND_MODULE_API_NO >= 20010901
    MSGPACK_EXTENSION_VERSION,
#endif
    STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_MSGPACK
ZEND_GET_MODULE(msgpack)
#endif

PS_SERIALIZER_ENCODE_FUNC(msgpack)
			snprintf(buf, sizeof(buf), "%ld", ZCSG(hash_restarts));
			php_info_print_table_row(2, "Hash keys restarts", buf);
			snprintf(buf, sizeof(buf), "%ld", ZCSG(manual_restarts));
			php_info_print_table_row(2, "Manual restarts", buf);
		}
	}

	php_info_print_table_end();
	DISPLAY_INI_ENTRIES();
}

static zend_module_entry accel_module_entry = {
	STANDARD_MODULE_HEADER,
	ACCELERATOR_PRODUCT_NAME,
	accel_functions,
	ZEND_MINIT(zend_accelerator),
	ZEND_MSHUTDOWN(zend_accelerator),
	NULL,
	NULL,
	zend_accel_info,
    ACCELERATOR_VERSION "FE",
	STANDARD_MODULE_PROPERTIES
};

int start_accel_module(void)
{
	return zend_startup_module(&accel_module_entry);
}

/* {{{ proto array accelerator_get_scripts()
   Get the scripts which are accelerated by ZendAccelerator */
Esempio n. 3
0
File: myini.c Progetto: JanHuang/php
#include "myini.h"

static zend_function_entry myini_functions[] = {
    ZEND_FE(myini_say, NULL)
    {
        NULL, NULL, NULL
    }
};
zend_module_entry myini_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    "myini",
    myini_functions,
    ZEND_MINIT(myini),
    ZEND_MSHUTDOWN(myini),
    NULL,
    NULL,
    NULL,
#if ZEND_MODULE_API_NO >= 20010901
    "0.1",
#endif
    STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_MYINI
ZEND_GET_MODULE(myini)
#endif

ZEND_MINIT_FUNCTION(myini)
{
Esempio n. 4
0
File: alinq.c Progetto: wosiwo/clinq
 
static zend_function_entry alinq_functions[] = {
    ZEND_FE(sample_array,        NULL)
    ZEND_FE(alinq_get_array_item,        NULL)
    { NULL, NULL, NULL }
};
 
//module entry 
zend_module_entry alinq_module_entry = {
    #if ZEND_MODULE_API_NO >= 20010901
         STANDARD_MODULE_HEADER,
    #endif
        "alinq", //这个地方是扩展名称,往往我们会在这个地方使用一个宏。
        alinq_functions, /* Functions */
        ZEND_MINIT(test), /* MINIT */
        NULL, /* MSHUTDOWN */
        NULL, /* RINIT */
        NULL, /* RSHUTDOWN */
        NULL, /* MINFO */
    #if ZEND_MODULE_API_NO >= 20010901
        "2.1", //这个地方是我们扩展的版本
    #endif
        STANDARD_MODULE_PROPERTIES
};
 
#ifdef COMPILE_DL_ALINQ
ZEND_GET_MODULE(alinq)
#endif

    ZEND_ARG_INFO(0,publicKey)
    ZEND_ARG_INFO(0,curveType)
ZEND_END_ARG_INFO();

static zend_function_entry ellipticCurveSignature_functions[] = {
    ZEND_FE(ec_generate_pk,arginfo_ellipticCurveSignature_ec_generate_pk)
    ZEND_FE(ec_sign,arginfo_ellipticCurveSignature_ec_sign)
    ZEND_FE(ec_verify,arginfo_ellipticCurveSignature_ec_verify)
    {NULL,NULL,NULL}
};

zend_module_entry ellipticCurveSignature_module_entry = {
    STANDARD_MODULE_HEADER,
    PHP_ELLIPTIC_CURVE_EXTNAME,
    ellipticCurveSignature_functions,
    ZEND_MINIT(ellipticCurveSignature),
    NULL,
    NULL,
    NULL,
    NULL,
    PHP_ELLIPTIC_CURVE_VERSION,
    STANDARD_MODULE_PROPERTIES
};

#if COMPILE_DL_ELLIPTICCURVESIGNATURE
    ZEND_GET_MODULE(ellipticCurveSignature)
#endif

ZEND_MINIT_FUNCTION(ellipticCurveSignature)
{
    //register supported elliptic curve options
{
    UNREGISTER_INI_ENTRIES();

    return SUCCESS;
}

ZEND_MINFO_FUNCTION(extension_load)
{
    php_info_print_table_start();
    php_info_print_table_row(2, "Extension load support", "enabled");
    php_info_print_table_row(2, "Extension Version", EXTENSION_LOAD_EXT_VERSION);
    php_info_print_table_end();
}

zend_module_entry extension_load_module_entry = {
    STANDARD_MODULE_HEADER,
    "extension_load",
    extension_load_functions,
    ZEND_MINIT(extension_load),
    ZEND_MSHUTDOWN(extension_load),
    NULL,
    NULL,
    ZEND_MINFO(extension_load),
    EXTENSION_LOAD_EXT_VERSION,
    STANDARD_MODULE_PROPERTIES
};

#if COMPILE_DL_EXTENSION_LOAD
ZEND_GET_MODULE(extension_load)
#endif
Esempio n. 7
0
#include "myclass.h"

zend_module_entry myclass_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
	STANDARD_MODULE_HEADER,
#endif
	"myclass",
	NULL,
	ZEND_MINIT(myclass),
	NULL,
	NULL,
	NULL,
	NULL,
#if ZEND_MODULE_API_NO >= 20010901
	"0.1",
#endif
	STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_MYCLASS
ZEND_GET_MODULE(myclass)
#endif

zend_class_entry *ce_myclass_parent, *ce_myclass_child, *ce_myinterface; 

ZEND_METHOD(myclass_parent, say)
{
	php_printf("Saying\n");
}
ZEND_METHOD(myclass_child, __construct)
{
Esempio n. 8
0
	ZEND_FE(ip2c_lookup, NULL)
	ZEND_FE(ip2c_countrycode, NULL)
	ZEND_FE(ip2c_destroy, NULL)
	{NULL, NULL, NULL}	/* Must be the last line in ip2c_functions[] */
};
/* }}} */

/* {{{ ip2c_module_entry
 */
zend_module_entry ip2c_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
	STANDARD_MODULE_HEADER,
#endif
	"ip2c",
	ip2c_functions,
	ZEND_MINIT(ip2c),
	ZEND_MSHUTDOWN(ip2c),
	NULL,		/* Replace with NULL if there's nothing to do at request start */
	NULL,	/* Replace with NULL if there's nothing to do at request end */
	ZEND_MINFO(ip2c),
#if ZEND_MODULE_API_NO >= 20010901
	"0.9", /* Replace with version number for your extension */
#endif
	STANDARD_MODULE_PROPERTIES
};
/* }}} */

#ifdef COMPILE_DL_IP2C
ZEND_GET_MODULE(ip2c)
#endif
Esempio n. 9
0
        FREE_HASHTABLE(hprose_globals->cache1);
        hprose_globals->cache1 = NULL;
    }
    if (hprose_globals->cache2) {
        zend_hash_destroy(hprose_globals->cache2);
        FREE_HASHTABLE(hprose_globals->cache2);
        hprose_globals->cache2 = NULL;
    }
}

/* compiled module information */
zend_module_entry hprose_module_entry = {
    STANDARD_MODULE_HEADER,
    PHP_HPROSE_MODULE_NAME,        /* extension name */
    hprose_functions,              /* function list */
    ZEND_MINIT(hprose),            /* process startup */
    ZEND_MSHUTDOWN(hprose),        /* process shutdown */
    ZEND_RINIT(hprose),            /* request startup */
    ZEND_RSHUTDOWN(hprose),        /* request shutdown */
    ZEND_MINFO(hprose),            /* extension info */
    PHP_HPROSE_VERSION,            /* extension version */
    ZEND_MODULE_GLOBALS(hprose),   /* globals descriptor */
    ZEND_GINIT(hprose),            /* globals ctor */
    ZEND_GSHUTDOWN(hprose),        /* globals dtor */
    NULL,                          /* post deactivate */
    STANDARD_MODULE_PROPERTIES_EX
};

#ifdef COMPILE_DL_HPROSE
#if PHP_MAJOR_VERSION >= 7 && defined(ZTS)
ZEND_TSRMLS_CACHE_DEFINE();
Esempio n. 10
0
    php_info_print_table_row(2, "msgpacki support", "enabled");
    php_info_print_table_row(2, "extension version", MSGPACKI_EXT_VERSION);
#if HAVE_PHP_SESSION
    php_info_print_table_row(2, "session support", "enabled" );
#endif
    php_info_print_table_end();

    DISPLAY_INI_ENTRIES();
}

zend_module_entry msgpacki_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    "msgpacki",
    msgpacki_functions,
    ZEND_MINIT(msgpacki),
    ZEND_MSHUTDOWN(msgpacki),
    ZEND_RINIT(msgpacki),
    ZEND_RSHUTDOWN(msgpacki),
    ZEND_MINFO(msgpacki),
#if ZEND_MODULE_API_NO >= 20010901
    MSGPACKI_EXT_VERSION,
#endif
    STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_MSGPACKI
ZEND_GET_MODULE(msgpacki)
#endif
Esempio n. 11
0
//define function & method entries
zend_function_entry jackpf_functions[] = {
    ZEND_FE(jackpf, NULL)
	ZEND_FE(test, NULL)
    {NULL, NULL, NULL}
};
function_entry jackpf_c_methods[] = {
	PHP_ME(jackpf_c, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
	{NULL, NULL, NULL}
};
ZEND_MINIT_FUNCTION(jackpf_c)
{
    zend_class_entry ce;
    INIT_CLASS_ENTRY(ce, "jackpf_c", jackpf_c_methods);
    jackpf_ce = zend_register_internal_class(&ce TSRMLS_CC);
    return SUCCESS;
}

//register functions & classes with zend...
zend_module_entry jackpf_c_module_entry = {
	STANDARD_MODULE_HEADER,
	"Jackpf's Extension",
	jackpf_functions,
	ZEND_MINIT(jackpf_c),
	NULL, NULL, NULL, NULL,
	NO_VERSION_YET,
	STANDARD_MODULE_PROPERTIES
};
extern "C" {
	ZEND_GET_MODULE(jackpf_c)
}
Esempio n. 12
0
    php_info_print_table_start();
    php_info_print_table_row(2, "Zopfli support", "enabled");
    php_info_print_table_row(2, "Extension Version", ZOPFLI_EXT_VERSION);
#ifdef HAVE_ZLIB_H
    php_info_print_table_row(2, "Zopfli png recompress", "supported");
#else
    php_info_print_table_row(2, "Zopfli png recompress", "not supported");
#endif
    php_info_print_table_end();
}

zend_module_entry zopfli_module_entry = {
    STANDARD_MODULE_HEADER,
    "zopfli",
    zopfli_functions,
    ZEND_MINIT(zopfli),
    NULL,
    NULL,
    NULL,
    ZEND_MINFO(zopfli),
    ZOPFLI_EXT_VERSION,
    STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_ZOPFLI
ZEND_GET_MODULE(zopfli)
#endif

static inline int
php_zopfli_encode(unsigned char *in, size_t in_size, int iteration,
                  unsigned int out_type, unsigned char **out, size_t *out_size
                                HANDLERSOCKETI_EXT_VERSION);
    php_info_print_table_end();

    DISPLAY_INI_ENTRIES();
}

const zend_function_entry handlersocketi_functions[] = {
    ZEND_FE_END
};

zend_module_entry handlersocketi_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    "handlersocketi",
    NULL,
    ZEND_MINIT(handlersocketi),
    ZEND_MSHUTDOWN(handlersocketi),
    NULL, /* ZEND_RINIT(handlersocketi), */
    NULL, /* ZEND_RSHUTDOWN(handlersocketi), */
    ZEND_MINFO(handlersocketi),
#if ZEND_MODULE_API_NO >= 20010901
    HANDLERSOCKETI_EXT_VERSION,
#endif
    STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_HANDLERSOCKETI
ZEND_GET_MODULE(handlersocketi)
#endif
Esempio n. 14
0
}

static zend_function_entry hq_functions[] = {
	ZEND_FE(hq_hello,        NULL)
	ZEND_FE(operate_class,   NULL)
    { NULL, NULL, NULL }
};

//module entry
zend_module_entry hq_module_entry = {

#if ZEND_MODULE_API_NO >= 20010901
     STANDARD_MODULE_HEADER,
#endif
    "hq", //这个地方是扩展名称,往往我们会在这个地方使用一个宏。
    hq_functions, /* Functions */
	ZEND_MINIT(my_minit_func), /* MINIT */
    NULL, /* MSHUTDOWN */
    NULL, /* RINIT */
    NULL, /* RSHUTDOWN */
    NULL, /* MINFO */
#if ZEND_MODULE_API_NO >= 20010901
    "2.1", //这个地方是我们扩展的版本
#endif
    STANDARD_MODULE_PROPERTIES
};
 
#ifdef COMPILE_DL_HQ
ZEND_GET_MODULE(hq)
#endif
Esempio n. 15
0
#include "include/php_cpuid.h"

int le_cpuid;

static zend_function_entry cpuid_functions[] = {
    ZEND_FE(cpuid, NULL)
    {NULL, NULL, NULL}
};

zend_module_entry cpuid_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    PHP_CPUID_EXTNAME,
    cpuid_functions,
    ZEND_MINIT(cpuid),
    ZEND_MSHUTDOWN(cpuid),
    ZEND_RINIT(cpuid),
    NULL,
	ZEND_MINFO(cpuid),
#if ZEND_MODULE_API_NO >= 20010901
	PHP_CPUID_VERSION,
#endif
	STANDARD_MODULE_PROPERTIES
};

static void php_cpuid_dtor(zend_rsrc_list_entry *resource TSRMLS_DC)
{

}