Changeset 1477 in svn for trunk/mod_cacher/xc_cacher.c


Ignore:
Timestamp:
2013-11-23T01:46:42Z (21 months ago)
Author:
Xuefer
Message:

adds reflection info for APIs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_cacher/xc_cacher.c

    r1470 r1477  
    31333133/* {{{ proto int xcache_count(int type)
    31343134   Return count of cache on specified cache type */
     3135#ifdef ZEND_BEGIN_ARG_INFO_EX
     3136ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_count, 0, 0, 1)
     3137    ZEND_ARG_INFO(0, type)
     3138ZEND_END_ARG_INFO()
     3139#else
     3140static unsigned char arginfo_xcache_count[] = { 1, BYREF_NONE };
     3141#endif
     3142
    31353143PHP_FUNCTION(xcache_count)
    31363144{
     
    31403148/* {{{ proto array xcache_info(int type, int id)
    31413149   Get cache info by id on specified cache type */
     3150#ifdef ZEND_BEGIN_ARG_INFO_EX
     3151ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_info, 0, 0, 2)
     3152    ZEND_ARG_INFO(0, type)
     3153    ZEND_ARG_INFO(0, id)
     3154ZEND_END_ARG_INFO()
     3155#else
     3156static unsigned char arginfo_xcache_info[] = { 2, BYREF_NONE, BYREF_NONE };
     3157#endif
     3158
    31423159PHP_FUNCTION(xcache_info)
    31433160{
     
    31473164/* {{{ proto array xcache_list(int type, int id)
    31483165   Get cache entries list by id on specified cache type */
     3166#ifdef ZEND_BEGIN_ARG_INFO_EX
     3167ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_list, 0, 0, 2)
     3168    ZEND_ARG_INFO(0, type)
     3169    ZEND_ARG_INFO(0, id)
     3170ZEND_END_ARG_INFO()
     3171#else
     3172static unsigned char arginfo_xcache_list[] = { 2, BYREF_NONE, BYREF_NONE };
     3173#endif
     3174
    31493175PHP_FUNCTION(xcache_list)
    31503176{
     
    31543180/* {{{ proto array xcache_clear_cache(int type, [ int id = -1 ])
    31553181   Clear cache by id on specified cache type */
     3182#ifdef ZEND_BEGIN_ARG_INFO_EX
     3183ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_clear_cache, 0, 0, 1)
     3184    ZEND_ARG_INFO(0, type)
     3185    ZEND_ARG_INFO(0, id)
     3186ZEND_END_ARG_INFO()
     3187#else
     3188static unsigned char arginfo_xcache_clear_cache[] = { 2, BYREF_NONE, BYREF_NONE };
     3189#endif
     3190
    31563191PHP_FUNCTION(xcache_clear_cache)
    31573192{
     
    31613196/* {{{ proto array xcache_enable_cache(int type, [ int id = -1, [ bool enable = true ] ])
    31623197   Enable or disable cache by id on specified cache type */
     3198#ifdef ZEND_BEGIN_ARG_INFO_EX
     3199ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_enable_cache, 0, 0, 1)
     3200    ZEND_ARG_INFO(0, type)
     3201    ZEND_ARG_INFO(0, id)
     3202    ZEND_ARG_INFO(0, enable)
     3203ZEND_END_ARG_INFO()
     3204#else
     3205static unsigned char arginfo_xcache_enable_cache[] = { 1, BYREF_NONE };
     3206#endif
     3207
    31633208PHP_FUNCTION(xcache_enable_cache)
    31643209{
     
    31683213/* {{{ proto mixed xcache_admin_namespace()
    31693214   Break out of namespace limitation */
     3215#ifdef ZEND_BEGIN_ARG_INFO_EX
     3216ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_admin_namespace, 0, 0, 0)
     3217ZEND_END_ARG_INFO()
     3218#else
     3219static unsigned char arginfo_xcache_admin_namespace[] = { 0 };
     3220#endif
     3221
    31703222PHP_FUNCTION(xcache_admin_namespace)
    31713223{
     
    31993251/* {{{ proto mixed xcache_set_namespace(string namespace)
    32003252   Switch to user defined namespace */
     3253#ifdef ZEND_BEGIN_ARG_INFO_EX
     3254ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_set_namespace, 0, 0, 1)
     3255    ZEND_ARG_INFO(0, namespace)
     3256ZEND_END_ARG_INFO()
     3257#else
     3258static unsigned char arginfo_xcache_set_namespace[] = { 1, BYREF_NONE };
     3259#endif
     3260
    32013261PHP_FUNCTION(xcache_set_namespace)
    32023262{
     
    32243284/* {{{ proto mixed xcache_get(string name)
    32253285   Get cached data by specified name */
     3286#ifdef ZEND_BEGIN_ARG_INFO_EX
     3287ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_get, 0, 0, 1)
     3288    ZEND_ARG_INFO(0, name)
     3289ZEND_END_ARG_INFO()
     3290#else
     3291static unsigned char arginfo_xcache_get[] = { 1, BYREF_NONE };
     3292#endif
     3293
    32263294PHP_FUNCTION(xcache_get)
    32273295{
     
    32653333/* {{{ proto bool  xcache_set(string name, mixed value [, int ttl])
    32663334   Store data to cache by specified name */
     3335#ifdef ZEND_BEGIN_ARG_INFO_EX
     3336ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_set, 0, 0, 2)
     3337    ZEND_ARG_INFO(0, name)
     3338    ZEND_ARG_INFO(0, value)
     3339    ZEND_ARG_INFO(0, ttl)
     3340ZEND_END_ARG_INFO()
     3341#else
     3342static unsigned char arginfo_xcache_set[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_NONE };
     3343#endif
     3344
    32673345PHP_FUNCTION(xcache_set)
    32683346{
     
    33163394/* {{{ proto bool  xcache_isset(string name)
    33173395   Check if an entry exists in cache by specified name */
     3396#ifdef ZEND_BEGIN_ARG_INFO_EX
     3397ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_isset, 0, 0, 1)
     3398    ZEND_ARG_INFO(0, name)
     3399ZEND_END_ARG_INFO()
     3400#else
     3401static unsigned char arginfo_xcache_isset[] = { 1, BYREF_NONE };
     3402#endif
     3403
    33183404PHP_FUNCTION(xcache_isset)
    33193405{
     
    33583444/* {{{ proto bool  xcache_unset(string name)
    33593445   Unset existing data in cache by specified name */
     3446#ifdef ZEND_BEGIN_ARG_INFO_EX
     3447ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_unset, 0, 0, 1)
     3448    ZEND_ARG_INFO(0, name)
     3449ZEND_END_ARG_INFO()
     3450#else
     3451static unsigned char arginfo_xcache_unset[] = { 1, BYREF_NONE };
     3452#endif
     3453
    33603454PHP_FUNCTION(xcache_unset)
    33613455{
     
    33983492/* {{{ proto bool  xcache_unset_by_prefix(string prefix)
    33993493   Unset existing data in cache by specified prefix */
     3494#ifdef ZEND_BEGIN_ARG_INFO_EX
     3495ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_unset_by_prefix, 0, 0, 1)
     3496    ZEND_ARG_INFO(0, prefix)
     3497ZEND_END_ARG_INFO()
     3498#else
     3499static unsigned char arginfo_xcache_unset_by_prefix[] = { 1, BYREF_NONE };
     3500#endif
     3501
    34003502PHP_FUNCTION(xcache_unset_by_prefix)
    34013503{
     
    35183620/* {{{ proto int xcache_inc(string name [, int value [, int ttl]])
    35193621   Increase an int counter in cache by specified name, create it if not exists */
     3622#ifdef ZEND_BEGIN_ARG_INFO_EX
     3623ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_inc, 0, 0, 1)
     3624    ZEND_ARG_INFO(0, prefix)
     3625    ZEND_ARG_INFO(0, value)
     3626    ZEND_ARG_INFO(0, ttl)
     3627ZEND_END_ARG_INFO()
     3628#else
     3629static unsigned char arginfo_xcache_inc[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_NONE };
     3630#endif
     3631
    35203632PHP_FUNCTION(xcache_inc)
    35213633{
     
    35253637/* {{{ proto int xcache_dec(string name [, int value [, int ttl]])
    35263638   Decrease an int counter in cache by specified name, create it if not exists */
     3639#ifdef ZEND_BEGIN_ARG_INFO_EX
     3640ZEND_BEGIN_ARG_INFO_EX(arginfo_xcache_dec, 0, 0, 1)
     3641    ZEND_ARG_INFO(0, prefix)
     3642    ZEND_ARG_INFO(0, value)
     3643    ZEND_ARG_INFO(0, ttl)
     3644ZEND_END_ARG_INFO()
     3645#else
     3646static unsigned char arginfo_xcache_dec[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_NONE };
     3647#endif
     3648
    35273649PHP_FUNCTION(xcache_dec)
    35283650{
     
    35323654static zend_function_entry xcache_cacher_functions[] = /* {{{ */
    35333655{
    3534     PHP_FE(xcache_count,             NULL)
    3535     PHP_FE(xcache_info,              NULL)
    3536     PHP_FE(xcache_list,              NULL)
    3537     PHP_FE(xcache_clear_cache,       NULL)
    3538     PHP_FE(xcache_enable_cache,      NULL)
    3539     PHP_FE(xcache_admin_namespace,   NULL)
    3540     PHP_FE(xcache_set_namespace,     NULL)
    3541     PHP_FE(xcache_get,               NULL)
    3542     PHP_FE(xcache_set,               NULL)
    3543     PHP_FE(xcache_isset,             NULL)
    3544     PHP_FE(xcache_unset,             NULL)
    3545     PHP_FE(xcache_unset_by_prefix,   NULL)
    3546     PHP_FE(xcache_inc,               NULL)
    3547     PHP_FE(xcache_dec,               NULL)
     3656    PHP_FE(xcache_count,             arginfo_xcache_count)
     3657    PHP_FE(xcache_info,              arginfo_xcache_info)
     3658    PHP_FE(xcache_list,              arginfo_xcache_list)
     3659    PHP_FE(xcache_clear_cache,       arginfo_xcache_clear_cache)
     3660    PHP_FE(xcache_enable_cache,      arginfo_xcache_enable_cache)
     3661    PHP_FE(xcache_admin_namespace,   arginfo_xcache_admin_namespace)
     3662    PHP_FE(xcache_set_namespace,     arginfo_xcache_set_namespace)
     3663    PHP_FE(xcache_get,               arginfo_xcache_get)
     3664    PHP_FE(xcache_set,               arginfo_xcache_set)
     3665    PHP_FE(xcache_isset,             arginfo_xcache_isset)
     3666    PHP_FE(xcache_unset,             arginfo_xcache_unset)
     3667    PHP_FE(xcache_unset_by_prefix,   arginfo_xcache_unset_by_prefix)
     3668    PHP_FE(xcache_inc,               arginfo_xcache_inc)
     3669    PHP_FE(xcache_dec,               arginfo_xcache_dec)
    35483670    PHP_FE_END
    35493671};
Note: See TracChangeset for help on using the changeset viewer.