예제 #1
0
ZEND_BEGIN_ARG_INFO_EX(hprose_bytes_io_write_arginfo, 0, 0, 1)
    ZEND_ARG_INFO(0, str)
    ZEND_ARG_INFO(0, n)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(hprose_bytes_io_load_arginfo, 0, 0, 1)
    ZEND_ARG_INFO(0, filename)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(hprose_bytes_io_save_arginfo, 0, 0, 1)
    ZEND_ARG_INFO(0, filename)
ZEND_END_ARG_INFO()

static zend_function_entry hprose_bytes_io_methods[] = {
    ZEND_ME(hprose_bytes_io, __construct, hprose_bytes_io_construct_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
    ZEND_ME(hprose_bytes_io, close, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, length, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, getc, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, read, hprose_bytes_io_long_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, readfull, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, readuntil, hprose_bytes_io_readuntil_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, readString, hprose_bytes_io_long_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, mark, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, unmark, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, reset, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, skip, hprose_bytes_io_long_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, eof, hprose_bytes_io_void_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, write, hprose_bytes_io_write_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, load, hprose_bytes_io_load_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(hprose_bytes_io, save, hprose_bytes_io_save_arginfo, ZEND_ACC_PUBLIC)
예제 #2
0
        connection = nc_kernel_injection_property(getThis(), "masterConnection", Nc_Sql_Connection_ce);
    }
    else
    {
        connection = nc_kernel_injection_property(getThis(), "slaveConnection", Nc_Sql_Connection_ce);
    }

    if (!connection)
        return;

    r = zend_call_method_with_2_params(&connection, Z_OBJCE_P(connection), NULL, "query", &r, sql, flag);
    zval_ptr_dtor(&connection);

    if (!r)
    {
        zend_throw_exception(Nc_Sql_Exception_ce, "Cannot invoke query of injection property masterConnection/slaveConnection.", 0 TSRMLS_CC);
        return;
    }

    RETVAL_ZVAL(r, 0, 0);
    efree(r);
}

zend_function_entry Nc_Sql_MasterSlaveConnection_methods[] = {
    ZEND_ME(Nc_Sql_MasterSlaveConnection, begin, Nc_Sql_MasterSlaveConnection_begin_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(Nc_Sql_MasterSlaveConnection, commit, Nc_Sql_MasterSlaveConnection_commit_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(Nc_Sql_MasterSlaveConnection, rollback, Nc_Sql_MasterSlaveConnection_rollback_arginfo, ZEND_ACC_PUBLIC)
    ZEND_ME(Nc_Sql_MasterSlaveConnection, query, Nc_Sql_MasterSlaveConnection_query_arginfo, ZEND_ACC_PUBLIC)
    ZEND_FE_END
};
예제 #3
0
  }

  RDTSC_RETURN_LONG_LONG(getticks());
}

/* }}} */
/* {{{ Global functions */

/* }}} */
/* {{{ Method tables for classes */

ZEND_BEGIN_ARG_INFO_EX(arginfo_rdtsc_Rdtsc_ticks, 0, 0, 0)
ZEND_END_ARG_INFO()

static zend_function_entry rdtsc_Rdtsc_functions[] = {
  ZEND_ME(Rdtsc,               ticks,                      arginfo_rdtsc_Rdtsc_ticks,                      ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
  {NULL, NULL, NULL}
};

/* }}} */
/* {{{ Function table */

static zend_function_entry rdtsc_functions[] = {
  {NULL, NULL, NULL}
};

/* }}} */
/* {{{ Init */

PHP_MINIT_FUNCTION(rdtsc)
{
예제 #4
0
파일: myclass.c 프로젝트: JanHuang/php
	MAKE_STD_ZVAL(this);
	MAKE_STD_ZVAL(retval);
	MAKE_STD_ZVAL(say);
	ZVAL_STRINGL(say, "say", sizeof("say") - 1, 1);
	object_init_ex(this, ce_myclass_child); //实例化对象
	call_user_function(NULL, &this, say, retval, 0, NULL TSRMLS_CC); //调用对象方法
	zval_ptr_dtor(&this);
	zval_ptr_dtor(&retval);
	zval_ptr_dtor(&say);
}
static zend_function_entry myinterface_methods[] = {
	ZEND_ABSTRACT_ME(myinterface, say, NULL)
	{NULL, NULL, NULL}
};
static zend_function_entry myclass_parent_methods[] = {
	ZEND_ME(myclass_parent, say, NULL, ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};
static zend_function_entry myclass_child_methods[] = {
	ZEND_ME(myclass_child, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
	ZEND_ME(myclass_child, call_say, NULL, ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};

ZEND_MINIT_FUNCTION(myclass)
{
	zend_class_entry ce_c, ce_p, ce_i;
	
	INIT_CLASS_ENTRY(ce_i, "myinterface", myinterface_methods);
	ce_myinterface = zend_register_internal_interface(&ce_i TSRMLS_CC);
	
zend_class_entry *ce_ArchiveWriter;
zend_class_entry *ce_ArchiveWriterInterface;

/* zend_function_entry funcs_ArchiveWriterInterface {{{ */
zend_function_entry funcs_ArchiveWriterInterface[] = {
 	ZEND_ABSTRACT_ME(ArchiveWriter, __construct,  NULL)
	ZEND_ABSTRACT_ME(ArchiveWriter, addEntry,  NULL)
	ZEND_ABSTRACT_ME(ArchiveWriter, finish,  NULL)
	{NULL, NULL, NULL}
};
/* }}} */

/* zend_function_entry funcs_ArchiveWriter {{{ */
zend_function_entry funcs_ArchiveWriter[] = {
 	ZEND_ME(ArchiveWriter, __construct,  NULL, 0)
	ZEND_ME(ArchiveWriter, addEntry,  NULL, 0)
	ZEND_ME(ArchiveWriter, finish,  NULL, 0)
	{NULL, NULL, NULL}
};
/* }}} */

/* {{{ PHP_MINIT_FUNCTION
 */
PHP_MINIT_FUNCTION(archive_writer)
{
	zend_class_entry tmp_ce_ArchiveWriter, tmp_ce_ArchiveWriterInterface;

	INIT_CLASS_ENTRY(tmp_ce_ArchiveWriterInterface, "ArchiveWriterInterface", funcs_ArchiveWriterInterface);
	ce_ArchiveWriterInterface = zend_register_internal_class(&tmp_ce_ArchiveWriterInterface TSRMLS_CC);
	ce_ArchiveWriterInterface->ce_flags = ZEND_ACC_INTERFACE;
예제 #6
0
파일: hq.c 프로젝트: hq-cml/php_extensions
    php_printf("hello world!\n");
}

//子类的call_hello方法
ZEND_METHOD(son_class,call_hello)
{
    //调用对象的方法
    zval *this_zval;
    this_zval = getThis();
    zend_call_method_with_0_params(&this_zval, son_class_ce, NULL, "hello", NULL);
}

//自定义类的方法列表
static zend_function_entry myclass_method[] = {
	//注意这个叫ZEND_ME,普通扩展函数是ZEND_FE
	ZEND_ME(myclass,    public_method,      NULL,   ZEND_ACC_PUBLIC)
	ZEND_ME(myclass,    update_get_member,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(myclass,    __construct,        NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
    { NULL, NULL, NULL }
};

//自定义接口的方法列表
static zend_function_entry myinterface_method[]={
	//ZEND_ABSTRACT_ME()宏声明一个abstract public类型的函数,这个函数不需要实现
    ZEND_ABSTRACT_ME(myinterface, hello, NULL) //注意这里的null指的是arginfo
    {NULL,NULL,NULL}
};

//父类的方法列表
static zend_function_entry parent_class_method[]={
    ZEND_ME(parent_class,hello,NULL,ZEND_ACC_PUBLIC)
예제 #7
0
파일: sdo.cpp 프로젝트: sumariva/sdo
	ZEND_ABSTRACT_ME(SDO_Sequence, getProperty, arginfo_sdo_sequence_getproperty)
	ZEND_ABSTRACT_ME(SDO_Sequence, move, arginfo_sdo_sequence_move)
	ZEND_ABSTRACT_ME(SDO_Sequence, insert, arginfo_sdo_sequence_insert)
	ZEND_ABSTRACT_ME(SDO_Sequence, count, 0)
	{NULL, NULL, NULL}
};
/* }}} */

/* {{{ SDO_List methods */
ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_list_insert, 0, ZEND_RETURN_VALUE, 1)
    ZEND_ARG_INFO(0, value)
    ZEND_ARG_INFO(0, index)
ZEND_END_ARG_INFO();

zend_function_entry sdo_list_methods[] = {
	ZEND_ME(SDO_List, __construct, 0, ZEND_ACC_PRIVATE)
	ZEND_ME(SDO_List, insert, arginfo_sdo_list_insert, ZEND_ACC_PUBLIC)
	ZEND_ME(SDO_List, count, 0, ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};
/* }}} */

/* {{{ SDO_DataFactory methods */
ZEND_BEGIN_ARG_INFO(arginfo_sdo_datafactory_create, 0)
    ZEND_ARG_INFO(0, type_namespace_uri)
    ZEND_ARG_INFO(0, type_name)
ZEND_END_ARG_INFO();

zend_function_entry sdo_datafactory_methods[] = {
	ZEND_ABSTRACT_ME(SDO_DataFactory, create, arginfo_sdo_datafactory_create)
	{NULL, NULL, NULL}
예제 #8
0
	zval* dispatcher;

	zval* self = getThis();


	dispatcher = zend_read_property(fool_application_ce,self,ZEND_STRL(FOOL_APPLICATION_PROPERTY_NAME_DISPATCHER),1 TSRMLS_CC);
	if((response = fool_dispatcher_dispatch(dispatcher TSRMLS_CC))){
		RETURN_ZVAL(response,1,1);
	}
	RETURN_FALSE;
}
/*}}}*/


zend_function_entry fool_application_methods[] = {
	ZEND_ME(fool_application,__construct,fool_application_construct_arginfo,ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
	ZEND_ME(fool_application,getInstance,fool_application_getinstance_arginfo,ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(fool_application,run,fool_application_run_arginfo,ZEND_ACC_PUBLIC)
	PHP_FE_END	/* Must be the last line in qpclass_functions[] */
};

FOOL_STARTUP_MODULE(application)
{
	zend_class_entry ce;
	INIT_CLASS_ENTRY(ce,"Fool_Application",fool_application_methods);

	fool_application_ce = zend_register_internal_class(&ce TSRMLS_CC);

	zend_declare_property_null(fool_application_ce,ZEND_STRL(FOOL_APPLICATION_PROPERTY_NAME_INSTANCE),ZEND_ACC_PRIVATE|ZEND_ACC_STATIC TSRMLS_CC);
	zend_declare_property_null(fool_application_ce,ZEND_STRL(FOOL_APPLICATION_PROPERTY_NAME_DISPATCHER),ZEND_ACC_PRIVATE TSRMLS_CC);
	zend_declare_property_null(fool_application_ce,ZEND_STRL(FOOL_APPLICATION_PROPERTY_NAME_LOADER),ZEND_ACC_PRIVATE TSRMLS_CC);
예제 #9
0
파일: afk_app.c 프로젝트: DigDeeply/afk
		efree(class_name);
		efree(class);
		zend_error(1, error);
	}
	efree(class_name);

	zval *obj, *function_name, *retval;
	MAKE_STD_ZVAL(obj);
	MAKE_STD_ZVAL(function_name);
	MAKE_STD_ZVAL(retval);
	object_init_ex(obj, *class);
	//php_var_dump(&obj, 1 TSRMLS_CC);

	ZVAL_STRINGL(function_name, "indexaction", strlen("indexaction"), 1);
	call_user_function(&((*class)->function_table), &obj, function_name, retval, 0, NULL TSRMLS_CC);

	zval_ptr_dtor(&obj);
	zval_ptr_dtor(&function_name);
	zval_ptr_dtor(&retval);
	//efree(class);

	RETURN_BOOL(1);
}/*}}}*/

zend_function_entry afk_app_method[] = {
	ZEND_ME(afk_app,    run,  afk_app_run_arginfo,   ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};


예제 #10
0
   | Authors: Derick Rethans <*****@*****.**>                             |
   +----------------------------------------------------------------------+
*/

/* $Id: collator.c,v 1.18 2008/09/20 22:06:18 felipe Exp $ */

#include "php.h"
#include "ext/standard/php_array.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "php_unicode.h"
#include <unicode/ucol.h>


const zend_function_entry collator_funcs_collator[] = {
	ZEND_ME(collator, __construct, NULL, ZEND_ACC_PUBLIC)
	ZEND_FENTRY(getDefault, 	ZEND_FN(collator_get_default), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_FENTRY(setDefault, 	ZEND_FN(collator_set_default), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_NAMED_FE(compare, 		ZEND_FN(collator_compare), NULL)
	ZEND_NAMED_FE(setStrength, 	ZEND_FN(collator_set_strength), NULL)
	ZEND_NAMED_FE(setAttribute, ZEND_FN(collator_set_attribute), NULL)
	ZEND_NAMED_FE(getStrength, 	ZEND_FN(collator_get_strength), NULL)
	ZEND_NAMED_FE(getAttribute, ZEND_FN(collator_get_attribute), NULL)
	ZEND_NAMED_FE(sort,			ZEND_FN(collator_sort), NULL)
	{NULL, NULL, NULL}
};

zend_class_entry *unicode_collator_ce;

static zend_object_handlers unicode_object_handlers_collator;
예제 #11
0
		RETURN_NULL();
	}
	if(zend_list_delete(Z_LVAL_PP(conhash_prop)) == FAILURE){
		RETURN_FALSE;
	}
	RETURN_TRUE;
}


const zend_function_entry consistent_functions[] = {
	PHP_FE(confirm_consistent_compiled,	NULL)		/* For testing, remove later. */
	{NULL,NULL,NULL}	/* Must be the last line in consistent_functions[] */
};

const zend_function_entry php_YConsistent_class_functions[] = {
	ZEND_ME(YConsistent,consistent_init,NULL,ZEND_ACC_PUBLIC)
	ZEND_ME(YConsistent,add_server,NULL,ZEND_ACC_PUBLIC)
	ZEND_ME(YConsistent,find_server,NULL,ZEND_ACC_PUBLIC)
	ZEND_ME(YConsistent,consistent_end,NULL,ZEND_ACC_PUBLIC)		
};
/* }}} */

static void conhash_dtor( zend_rsrc_list_entry *rsrc TSRMLS_DC )
{
	conhash *con = (conhash *)rsrc->ptr;
	efree(con);
}

/* {{{ consistent_module_entry
 */
zend_module_entry consistent_module_entry = {
예제 #12
0
 * Every user visible function must have an entry in util_functions[].
 */
const zend_function_entry util_functions[] = {
	PHP_FE(confirm_util_compiled,	NULL)		/* For testing, remove later. */
	PHP_FE_END	/* Must be the last line in util_functions[] */
};
/* }}} */

zend_class_entry *util_ce;

/* {{{ util_method[]
 *
 * Every user visible function must have an entry in util_functions[].
 */
static zend_function_entry util_method[] = {
	ZEND_ME(util,	array_first,		NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_last, 		NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_first_key,	NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_last_key,		NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_flatten,		NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_get,			NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_pluck,		NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_ME(util,	array_map_deep,		NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	{ NULL, NULL, NULL }
};
/* }}} */

/* {{{ util_module_entry
 */
zend_module_entry util_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
예제 #13
0
static void php_first_ext_init_globals(zend_first_ext_globals *first_ext_globals)
{
	first_ext_globals->global_value = 0;
	first_ext_globals->global_string = NULL;
}
/* }}} */


/*
  register a class 
*/

zend_class_entry *myclass_ce;

static zend_function_entry myclass_method[] = {
   ZEND_ME(myclass,public_method,NULL,ZEND_ACC_PUBLIC)
   ZEND_ME(myclass,__construct,NULL,ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
   {NULL,NULL,NULL}
};

ZEND_METHOD(myclass,public_method) {
   php_printf("this is pulic method to be called!");
}

ZEND_METHOD(myclass,__construct) {
   php_printf("this is construct method!");
}


/**
* register an interface
예제 #14
0
파일: test.c 프로젝트: DaveRandom/php-src
}
/* }}} */

static int zend_test_class_call_method(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS) /* {{{ */ {
	RETVAL_STR(zend_string_copy(method));
	return 0;
}
/* }}} */

static ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ {
	RETURN_TRUE;
}
/* }}} */

static const zend_function_entry zend_test_trait_methods[] = {
    ZEND_ME(_ZendTestTrait, testMethod, NULL, ZEND_ACC_PUBLIC)
    ZEND_FE_END
};

PHP_MINIT_FUNCTION(zend_test)
{
	zend_class_entry class_entry;

	INIT_CLASS_ENTRY(class_entry, "_ZendTestInterface", NULL);
	zend_test_interface = zend_register_internal_interface(&class_entry);
	zend_declare_class_constant_long(zend_test_interface, ZEND_STRL("DUMMY"), 0);
	INIT_CLASS_ENTRY(class_entry, "_ZendTestClass", NULL);
	zend_test_class = zend_register_internal_class_ex(&class_entry, NULL);
	zend_class_implements(zend_test_class, 1, zend_test_interface);
	zend_test_class->create_object = zend_test_class_new;
	zend_test_class->get_static_method = zend_test_class_static_method_get;
 	ZEND_ABSTRACT_ME(ArchiveReader, __construct,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, getNextEntry,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, getStream,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, getArchiveFormat,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, getCurrentEntryData,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, readCurrentEntryData,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, skipCurrentEntryData,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, extractCurrentEntry,  NULL)
	ZEND_ABSTRACT_ME(ArchiveReader, close,  NULL)
	{NULL, NULL, NULL}
};
/* }}} */

/* zend_function_entry funcs_ArchiveReader {{{ */
zend_function_entry funcs_ArchiveReader[] = {
 	ZEND_ME(ArchiveReader, __construct,  NULL, 0)
	ZEND_ME(ArchiveReader, getStream,  NULL, 0)
	ZEND_ME(ArchiveReader, getArchiveFormat,  NULL, 0)
	ZEND_ME(ArchiveReader, getNextEntry,  NULL, 0)
	ZEND_ME(ArchiveReader, getCurrentEntryData,  NULL, 0)
	ZEND_ME(ArchiveReader, readCurrentEntryData,  NULL, 0)
	ZEND_ME(ArchiveReader, skipCurrentEntryData,  NULL, 0)
	ZEND_ME(ArchiveReader, extractCurrentEntry,  NULL, 0)
	ZEND_ME(ArchiveReader, close,  NULL, 0)
	{NULL, NULL, NULL}
};
/* }}} */

/* {{{ PHP_MINIT_FUNCTION
 */
PHP_MINIT_FUNCTION(archive_reader)
예제 #16
0
파일: alinq.c 프로젝트: wosiwo/clinq
        }
       
    }
}




//]

//zend class{
 
//然后,定义一个zend_function_entry
zend_function_entry alinq_class_method[]=
{
    ZEND_ME(alinq_class,    __construct,    NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
    ZEND_ME(alinq_class,    ToArray,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    getArrayItem,  NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
    ZEND_ME(alinq_class,    Instance,  NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
    ZEND_ME(alinq_class,    ElementAt,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Single,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    GroupBy,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Concat,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    SelectMany,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Select,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Where,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Skip,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    All,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Any,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(alinq_class,    Average,  NULL,   ZEND_ACC_PUBLIC)
    // ZEND_ME(alinq_class,    GetApplicables,  NULL,   ZEND_ACC_PUBLIC)
예제 #17
0
파일: sean6.c 프로젝트: seanxh/minute
    fci.symbol_table = NULL;
    fci.retval_ptr_ptr = &ret;
    fci.param_count = 0;
    fci.params = NULL;
    fci.object_ptr = this;
    fci.no_separation =1;
    
    zend_call_function(&fci, NULL TSRMLS_CC);
    
    zval_dtor(function_name);
    efree(function_name);
    efree(ret);
}

static zend_function_entry myclass_method[]={
    ZEND_ME(myclass_ce,    public_method,  NULL,   ZEND_ACC_PUBLIC)
    ZEND_ME(myclass_ce,    __construct,    NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
    ZEND_ME(myclass_ce, call_self, NULL, ZEND_ACC_PUBLIC)
    {NULL,NULL,NULL}
};

/* {{{ sean6_module_entry
 */
zend_module_entry sean6_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
	STANDARD_MODULE_HEADER,
#endif
	"sean6",
	sean6_functions,
	PHP_MINIT(sean6),
	PHP_MSHUTDOWN(sean6),
예제 #18
0
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_msgpack_base_pack, 0, 0, 1)
    ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_msgpack_base_unpack, 0, 0, 1)
    ZEND_ARG_INFO(0, str)
    ZEND_ARG_INFO(0, object)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_msgpack_base_unpacker, 0, 0, 0)
ZEND_END_ARG_INFO()

static const zend_function_entry msgpack_base_methods[] = {
    ZEND_ME(msgpack, __construct,
            arginfo_msgpack_base___construct, ZEND_ACC_PUBLIC)
    ZEND_ME(msgpack, setOption, arginfo_msgpack_base_setOption, ZEND_ACC_PUBLIC)
    ZEND_ME(msgpack, pack, arginfo_msgpack_base_pack, ZEND_ACC_PUBLIC)
    ZEND_ME(msgpack, unpack, arginfo_msgpack_base_unpack, ZEND_ACC_PUBLIC)
    ZEND_ME(msgpack, unpacker, arginfo_msgpack_base_unpacker, ZEND_ACC_PUBLIC)
    {NULL, NULL, NULL}
};

/* MessagePackUnpacker */
static zend_class_entry *msgpack_unpacker_ce = NULL;

static ZEND_METHOD(msgpack_unpacker, __construct);
static ZEND_METHOD(msgpack_unpacker, __destruct);
static ZEND_METHOD(msgpack_unpacker, setOption);
static ZEND_METHOD(msgpack_unpacker, feed);
static ZEND_METHOD(msgpack_unpacker, execute);
예제 #19
0
파일: php_xio.c 프로젝트: tniuli/xio
ZEND_METHOD (Msghdr, __destruct)
{
	int rc;
	zval **hdr = 0;
	char *ptr;

	if (zend_hash_find (Z_OBJPROP_P (getThis ()), "__ptr", sizeof("__ptr"), (void **) &hdr) == FAILURE)
		return;
	if ((ptr = Z_STRVAL_PP (hdr)) && (ptr = * (char **) ptr)) {
		ubuf_free (ptr);
	}
}

static zend_function_entry msghdr_ce_method[] = {
	ZEND_ME (Msghdr, __construct,    NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
	ZEND_ME (Msghdr, __destruct,     NULL,   ZEND_ACC_PUBLIC|ZEND_ACC_DTOR)
	{ NULL, NULL, NULL }
};

ZEND_METHOD (Msg, __construct2)
{
	zval *hdr = 0;

	ALLOC_ZVAL (hdr);
	object_init_ex (hdr, msghdr_ce);

	if (zend_hash_update (Z_OBJPROP_P (getThis ()), "hdr", sizeof ("hdr"), &hdr, sizeof (hdr), 0) == FAILURE)
		BUG_ON (1);
}
예제 #20
0
	ZEND_ARG_INFO(0, closure)
	ZEND_ARG_INFO(0, newthis)
	ZEND_ARG_INFO(0, newscope)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_call, 0, 0, 1)
	ZEND_ARG_INFO(0, newthis)
	ZEND_ARG_VARIADIC_INFO(0, parameters)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_fromcallable, 0, 0, 1)
	ZEND_ARG_INFO(0, callable)
ZEND_END_ARG_INFO()

static const zend_function_entry closure_functions[] = {
	ZEND_ME(Closure, __construct, NULL, ZEND_ACC_PRIVATE)
	ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC)
	ZEND_ME(Closure, call, arginfo_closure_call, ZEND_ACC_PUBLIC)
	ZEND_ME(Closure, fromCallable, arginfo_closure_fromcallable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	ZEND_FE_END
};

void zend_register_closure_ce(void) /* {{{ */
{
	zend_class_entry ce;

	INIT_CLASS_ENTRY(ce, "Closure", closure_functions);
	zend_ce_closure = zend_register_internal_class(&ce);
	zend_ce_closure->ce_flags |= ZEND_ACC_FINAL;
	zend_ce_closure->create_object = zend_closure_new;
예제 #21
0
zend_class_entry *Nc_Sql_Orm_ModelFactory_ce;

NC_INIT_CLASS_FUNCTION(Nc_Sql_Orm_ModelFactory)
{
    zend_class_entry ce;
    INIT_CLASS_ENTRY(ce, "Nc\\Sql\\Orm\\ModelFactory", Nc_Sql_Orm_ModelFactory_methods);
    Nc_Sql_Orm_ModelFactory_ce = zend_register_internal_class_ex(&ce, Nc_Kernel_ce, NULL TSRMLS_CC);

    Nc_Sql_Orm_ModelFactory_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
    zend_class_implements(Nc_Sql_Orm_ModelFactory_ce TSRMLS_CC, 1, Nc_PropertyAccess_ce);
    zend_declare_property_null(Nc_Sql_Orm_ModelFactory_ce, ZEND_STRL("models"), ZEND_ACC_PROTECTED TSRMLS_CC);

    return SUCCESS;
}

ZEND_BEGIN_ARG_INFO_EX(Nc_Sql_Orm_ModelFactory_setModel_arginfo, 0, 0, 2)
    ZEND_ARG_OBJ_INFO(0, model, Nc\\Sql\\Orm\\Model, 0)
    ZEND_ARG_INFO(0, name)
    ZEND_ARG_ARRAY_INFO(0, metadata, 0)
ZEND_END_ARG_INFO()

ZEND_METHOD(Nc_Sql_Orm_ModelFactory, setModel)
{
}

zend_function_entry Nc_Sql_Orm_ModelFactory_methods[] = {
    ZEND_ME(Nc_Sql_Orm_ModelFactory, setModel, Nc_Sql_Orm_ModelFactory_setModel_arginfo, ZEND_ACC_PROTECTED)
    ZEND_FE_END
};