Back to index

php5  5.3.10
zend_interfaces.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | Zend Engine                                                          |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 2.00 of the Zend license,     |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.zend.com/license/2_00.txt.                                |
00011    | If you did not receive a copy of the Zend license and are unable to  |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@zend.com so we can mail you a copy immediately.              |
00014    +----------------------------------------------------------------------+
00015    | Authors: Marcus Boerger <helly@php.net>                              |
00016    +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: zend_interfaces.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef ZEND_INTERFACES_H
00022 #define ZEND_INTERFACES_H
00023 
00024 #include "zend.h"
00025 #include "zend_API.h"
00026 
00027 BEGIN_EXTERN_C()
00028 
00029 extern ZEND_API zend_class_entry *zend_ce_traversable;
00030 extern ZEND_API zend_class_entry *zend_ce_aggregate;
00031 extern ZEND_API zend_class_entry *zend_ce_iterator;
00032 extern ZEND_API zend_class_entry *zend_ce_arrayaccess;
00033 extern ZEND_API zend_class_entry *zend_ce_serializable;
00034 
00035 typedef struct _zend_user_iterator {
00036        zend_object_iterator     it;
00037        zend_class_entry         *ce;
00038        zval                     *value;
00039 } zend_user_iterator;
00040 
00041 ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC);
00042 
00043 #define zend_call_method_with_0_params(obj, obj_ce, fn_proxy, function_name, retval) \
00044        zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 0, NULL, NULL TSRMLS_CC)
00045 
00046 #define zend_call_method_with_1_params(obj, obj_ce, fn_proxy, function_name, retval, arg1) \
00047        zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 1, arg1, NULL TSRMLS_CC)
00048 
00049 #define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \
00050        zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2 TSRMLS_CC)
00051 
00052 ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter TSRMLS_DC);
00053 ZEND_API int zend_user_it_valid(zend_object_iterator *_iter TSRMLS_DC);
00054 ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC);
00055 ZEND_API void zend_user_it_get_current_data(zend_object_iterator *_iter, zval ***data TSRMLS_DC);
00056 ZEND_API void zend_user_it_move_forward(zend_object_iterator *_iter TSRMLS_DC);
00057 ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC);
00058 
00059 ZEND_API zval *zend_user_it_new_iterator(zend_class_entry *ce, zval *object TSRMLS_DC);
00060 ZEND_API zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
00061 
00062 ZEND_API void zend_register_interfaces(TSRMLS_D);
00063 
00064 ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC);
00065 ZEND_API int zend_user_unserialize(zval **object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC);
00066 
00067 ZEND_API int zend_class_serialize_deny(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC);
00068 ZEND_API int zend_class_unserialize_deny(zval **object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC);
00069 
00070 END_EXTERN_C()
00071 
00072 #endif /* ZEND_INTERFACES_H */
00073 
00074 /*
00075  * Local variables:
00076  * tab-width: 4
00077  * c-basic-offset: 4
00078  * indent-tabs-mode: t
00079  * End:
00080  */