<?php

echo proto_begin($method_name, $class_name);
echo $method_definition["return_type"];
?>
 <?php 
echo $class_name;
?>
_php::<?php 
echo $method_name;
?>
(<?php 
echo function_arguments_string($method_definition, false);
?>
)<?php 
echo $method_definition["constant"] ? "const\n" : "\n";
?>
{
	static zend_function* cached_function = NULL;
	static bool is_php_user_space_implemented = true;
	
	#ifdef USE_WXPHP_DEBUG
	php_printf("Invoking virtual <?php 
echo $class_name;
?>
::<?php 
echo $method_name;
?>
\n");
	php_printf("===========================================\n");
	#endif
示例#2
0
<?php

echo proto_begin($function_name);
?>
PHP_FUNCTION(php_wxDynamicCast)
{
	zval* object = 0;
	char* object_type;
	int object_type_len = 0;
	void* native_object = 0;
	
	char parse_parameters[] = "z!s!";
	
	if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, parse_parameters, &object , &object_type , &object_type_len ) == SUCCESS)
	{
		if(Z_TYPE_P(object) == IS_OBJECT)
		{
			native_object = (void*) ((zo_wxObject*) zend_object_store_get_object(object TSRMLS_CC))->native_object;
			
			if(!native_object)
			{
				zend_error(E_ERROR, "Could not retreive native object of argument 1\n");
			}
		}
		else
		{
			zend_error(E_ERROR, "Argument 1 is not an object\n");
		}
		
<?php 
foreach ($defIni as $className => $classDef) {