diff --git a/configs/ini.c b/configs/ini.c index 2f5a8ca6..a260ecc0 100644 --- a/configs/ini.c +++ b/configs/ini.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ini.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: ini.c 327425 2012-09-02 03:58:49Z laruence $ */ zend_class_entry *yaf_config_ini_ce; @@ -823,7 +823,7 @@ zend_function_entry yaf_config_ini_methods[] = { YAF_STARTUP_FUNCTION(config_ini) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Config_Ini", yaf_config_ini_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Config_Ini", "Yaf\\Config\\Ini", yaf_config_ini_methods); yaf_config_ini_ce = zend_register_internal_class_ex(&ce, yaf_config_ce, NULL TSRMLS_CC); #ifdef HAVE_SPL @@ -833,7 +833,6 @@ YAF_STARTUP_FUNCTION(config_ini) { #endif yaf_config_ini_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Config\\Ini", yaf_config_ini_ce); return SUCCESS; } diff --git a/configs/simple.c b/configs/simple.c index 0009b571..ca46145b 100644 --- a/configs/simple.c +++ b/configs/simple.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simple.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: simple.c 327425 2012-09-02 03:58:49Z laruence $ */ zend_class_entry *yaf_config_simple_ce; @@ -343,7 +343,7 @@ zend_function_entry yaf_config_simple_methods[] = { YAF_STARTUP_FUNCTION(config_simple) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Config_Simple", yaf_config_simple_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Config_Simple", "Yaf\\Config\\Simple", yaf_config_simple_methods); yaf_config_simple_ce = zend_register_internal_class_ex(&ce, yaf_config_ce, NULL TSRMLS_CC); #ifdef HAVE_SPL @@ -354,7 +354,6 @@ YAF_STARTUP_FUNCTION(config_simple) { zend_declare_property_bool(yaf_config_simple_ce, ZEND_STRL(YAF_CONFIG_PROPERT_NAME_READONLY), 0, ZEND_ACC_PROTECTED TSRMLS_CC); yaf_config_simple_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Config\\Simple", yaf_config_simple_ce); return SUCCESS; } diff --git a/php_yaf.h b/php_yaf.h index 2038bc3b..75bdd8da 100644 --- a/php_yaf.h +++ b/php_yaf.h @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_yaf.h 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: php_yaf.h 327561 2012-09-09 06:30:22Z laruence $ */ #ifndef PHP_YAF_H #define PHP_YAF_H @@ -119,6 +119,9 @@ ZEND_BEGIN_MODULE_GLOBALS(yaf) zval *active_ini_file_section; zval *ini_wanted_section; uint parsing_flag; +#ifdef YAF_HAVE_NAMESPACE + zend_bool use_namespace; +#endif ZEND_END_MODULE_GLOBALS(yaf) PHP_MINIT_FUNCTION(yaf); diff --git a/requests/http.c b/requests/http.c index 983a8381..25293a56 100644 --- a/requests/http.c +++ b/requests/http.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: http.c 327549 2012-09-09 03:02:48Z laruence $ */ #include "ext/standard/url.h" @@ -277,9 +277,8 @@ zend_function_entry yaf_request_http_methods[] = { */ YAF_STARTUP_FUNCTION(request_http){ zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Request_Http", yaf_request_http_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Request_Http", "Yaf\\Request\\Http", yaf_request_http_methods); yaf_request_http_ce = zend_register_internal_class_ex(&ce, yaf_request_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Request\\Http", yaf_request_http_ce); zend_declare_class_constant_string(yaf_request_ce, ZEND_STRL("SCHEME_HTTP"), "http" TSRMLS_CC); zend_declare_class_constant_string(yaf_request_ce, ZEND_STRL("SCHEME_HTTPS"), "https" TSRMLS_CC); diff --git a/requests/simple.c b/requests/simple.c index 53aa2804..6f7812fe 100644 --- a/requests/simple.c +++ b/requests/simple.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simple.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: simple.c 327554 2012-09-09 04:49:24Z laruence $ */ static zend_class_entry *yaf_request_simple_ce; @@ -255,11 +255,9 @@ zend_function_entry yaf_request_simple_methods[] = { */ YAF_STARTUP_FUNCTION(request_simple){ zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Request_Simple", yaf_request_simple_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Request_Simple", "Yaf\\Request\\Simple", yaf_request_simple_methods); yaf_request_simple_ce = zend_register_internal_class_ex(&ce, yaf_request_ce, NULL TSRMLS_CC); yaf_request_simple_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Request\\Simple", yaf_request_simple_ce); zend_declare_class_constant_string(yaf_request_simple_ce, ZEND_STRL("SCHEME_HTTP"), "http" TSRMLS_CC); zend_declare_class_constant_string(yaf_request_simple_ce, ZEND_STRL("SCHEME_HTTPS"), "https" TSRMLS_CC); diff --git a/response/cli.c b/response/cli.c index 98e036d5..849618b5 100644 --- a/response/cli.c +++ b/response/cli.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cli.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: cli.c 321289 2011-12-21 02:53:29Z laruence $ */ zend_class_entry * yaf_response_cli_ce; @@ -30,9 +30,10 @@ zend_function_entry yaf_response_cli_methods[] = { */ YAF_STARTUP_FUNCTION(response_cli) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Response_Cli", yaf_response_cli_methods); + + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Response_Cli", "Yaf\\Response\\Cli", yaf_response_cli_methods); + yaf_response_cli_ce = zend_register_internal_class_ex(&ce, yaf_response_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Response\\Cli", yaf_response_cli_ce); return SUCCESS; } diff --git a/response/http.c b/response/http.c index d0dac14d..e63f15e9 100644 --- a/response/http.c +++ b/response/http.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: http.c 321289 2011-12-21 02:53:29Z laruence $ */ zend_class_entry *yaf_response_http_ce; @@ -30,9 +30,9 @@ zend_function_entry yaf_response_http_methods[] = { YAF_STARTUP_FUNCTION(response_http) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Response_Http", yaf_response_http_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Response_Http", "Yaf\\Response\\Http", yaf_response_http_methods); + yaf_response_http_ce = zend_register_internal_class_ex(&ce, yaf_response_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Response\\Http", yaf_response_http_ce); zend_declare_property_bool(yaf_response_http_ce, ZEND_STRL(YAF_RESPONSE_PROPERTY_NAME_HEADEREXCEPTION), 1, ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_long(yaf_response_http_ce, ZEND_STRL(YAF_RESPONSE_PROPERTY_NAME_RESPONSECODE), 200, ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/routes/interface.c b/routes/interface.c index 8c7ed81b..ffa153cd 100644 --- a/routes/interface.c +++ b/routes/interface.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interface.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: interface.c 326042 2012-06-08 10:49:59Z laruence $ */ #include "ext/standard/php_smart_str.h" @@ -146,10 +146,8 @@ zend_function_entry yaf_route_methods[] = { */ YAF_STARTUP_FUNCTION(route) { zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Route_Interface", yaf_route_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Interface", "Yaf\\Route_Interface", yaf_route_methods); yaf_route_ce = zend_register_internal_interface(&ce TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Route_Interface", yaf_route_ce); YAF_STARTUP(route_static); YAF_STARTUP(route_simple); diff --git a/routes/map.c b/routes/map.c index d8357ac2..99e82298 100644 --- a/routes/map.c +++ b/routes/map.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: map.c 327565 2012-09-09 07:48:24Z laruence $*/ +/* $Id: map.c 327549 2012-09-09 03:02:48Z laruence $*/ zend_class_entry *yaf_route_map_ce; @@ -174,10 +174,9 @@ zend_function_entry yaf_route_map_methods[] = { YAF_STARTUP_FUNCTION(route_map) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Route_Map", yaf_route_map_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Map", "Yaf\\Route\\Map", yaf_route_map_methods); yaf_route_map_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); zend_class_implements(yaf_route_map_ce TSRMLS_CC, 1, yaf_route_ce); - YAF_INIT_CLASS_ALIAS("Yaf\\Route\\Map", yaf_route_map_ce); yaf_route_map_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; diff --git a/routes/regex.c b/routes/regex.c index a57257dd..00bbdb38 100644 --- a/routes/regex.c +++ b/routes/regex.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: regex.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: regex.c 327549 2012-09-09 03:02:48Z laruence $ */ zend_class_entry *yaf_route_regex_ce; @@ -237,12 +237,10 @@ zend_function_entry yaf_route_regex_methods[] = { */ YAF_STARTUP_FUNCTION(route_regex) { zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Route_Regex", yaf_route_regex_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Regex", "Yaf\\Route\\Regex", yaf_route_regex_methods); yaf_route_regex_ce = zend_register_internal_class_ex(&ce, yaf_route_ce, NULL TSRMLS_CC); zend_class_implements(yaf_route_regex_ce TSRMLS_CC, 1, yaf_route_ce); yaf_route_regex_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Route\\Regex", yaf_route_regex_ce); zend_declare_property_null(yaf_route_regex_ce, ZEND_STRL(YAF_ROUTE_PROPETY_NAME_MATCH), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_route_regex_ce, ZEND_STRL(YAF_ROUTE_PROPETY_NAME_ROUTE), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/routes/rewrite.c b/routes/rewrite.c index f5bbe59c..be3c6c9b 100644 --- a/routes/rewrite.c +++ b/routes/rewrite.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: rewrite.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: rewrite.c 327549 2012-09-09 03:02:48Z laruence $ */ zend_class_entry *yaf_route_rewrite_ce; @@ -298,12 +298,10 @@ zend_function_entry yaf_route_rewrite_methods[] = { */ YAF_STARTUP_FUNCTION(route_rewrite) { zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Route_Rewrite", yaf_route_rewrite_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Rewrite", "Yaf\\Route\\Rewrite", yaf_route_rewrite_methods); yaf_route_rewrite_ce = zend_register_internal_class_ex(&ce, yaf_route_ce, NULL TSRMLS_CC); zend_class_implements(yaf_route_rewrite_ce TSRMLS_CC, 1, yaf_route_ce); yaf_route_rewrite_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Route\\Rewrite", yaf_route_rewrite_ce); zend_declare_property_null(yaf_route_rewrite_ce, ZEND_STRL(YAF_ROUTE_PROPETY_NAME_MATCH), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_route_rewrite_ce, ZEND_STRL(YAF_ROUTE_PROPETY_NAME_ROUTE), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/routes/simple.c b/routes/simple.c index 52fcb797..1c725782 100644 --- a/routes/simple.c +++ b/routes/simple.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simple.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: simple.c 327549 2012-09-09 03:02:48Z laruence $ */ zend_class_entry *yaf_route_simple_ce; @@ -130,10 +130,9 @@ zend_function_entry yaf_route_simple_methods[] = { YAF_STARTUP_FUNCTION(route_simple) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Route_Simple", yaf_route_simple_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Simple", "Yaf\\Route\\Simple", yaf_route_simple_methods); yaf_route_simple_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); zend_class_implements(yaf_route_simple_ce TSRMLS_CC, 1, yaf_route_ce); - YAF_INIT_CLASS_ALIAS("Yaf\\Route\\Simple", yaf_route_simple_ce); yaf_route_simple_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; diff --git a/routes/static.c b/routes/static.c index fdb040ea..f278c518 100644 --- a/routes/static.c +++ b/routes/static.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: static.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: static.c 327548 2012-09-09 02:33:16Z laruence $ */ zend_class_entry * yaf_route_static_ce; @@ -196,10 +196,9 @@ zend_function_entry yaf_route_static_methods[] = { YAF_STARTUP_FUNCTION(route_static) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Route_Static", yaf_route_static_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Static", "Yaf\\Route_Static", yaf_route_static_methods); yaf_route_static_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); zend_class_implements(yaf_route_static_ce TSRMLS_CC, 1, yaf_router_ce); - YAF_INIT_CLASS_ALIAS("Yaf\\Route_Static", yaf_route_static_ce); return SUCCESS; } diff --git a/routes/supervar.c b/routes/supervar.c index fd0f1bf0..4a9cc50c 100644 --- a/routes/supervar.c +++ b/routes/supervar.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: supervar.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: supervar.c 327549 2012-09-09 03:02:48Z laruence $ */ #define YAF_ROUTE_SUPERVAR_PROPETY_NAME_VAR "_var_name" @@ -116,12 +116,10 @@ zend_function_entry yaf_route_supervar_methods[] = { */ YAF_STARTUP_FUNCTION(route_supervar) { zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Route_Supervar", yaf_route_supervar_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Supervar", "Yaf\\Route\\Supervar", yaf_route_supervar_methods); yaf_route_supervar_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); zend_class_implements(yaf_route_supervar_ce TSRMLS_CC, 1, yaf_route_ce); yaf_route_supervar_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Route\\Supervar", yaf_route_supervar_ce); zend_declare_property_null(yaf_route_supervar_ce, ZEND_STRL(YAF_ROUTE_SUPERVAR_PROPETY_NAME_VAR), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/views/interface.c b/views/interface.c index 30d5a8ef..d9cfb2b5 100644 --- a/views/interface.c +++ b/views/interface.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interface.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: interface.c 327426 2012-09-02 04:01:00Z laruence $ */ zend_class_entry *yaf_view_interface_ce; @@ -59,9 +59,8 @@ zend_function_entry yaf_view_interface_methods[] = { */ YAF_STARTUP_FUNCTION(view_interface) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_View_Interface", yaf_view_interface_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_View_Interface", "Yaf\\View_Interface", yaf_view_interface_methods); yaf_view_interface_ce = zend_register_internal_interface(&ce TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\View_Interface", yaf_view_interface_ce); return SUCCESS; } diff --git a/views/simple.c b/views/simple.c index 3883bbab..03ded40c 100644 --- a/views/simple.c +++ b/views/simple.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simple.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: simple.c 327562 2012-09-09 06:54:44Z laruence $ */ #include "main/php_output.h" @@ -897,9 +897,8 @@ zend_function_entry yaf_view_simple_methods[] = { YAF_STARTUP_FUNCTION(view_simple) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_View_Simple", yaf_view_simple_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_View_Simple", "Yaf\\View\\Simple", yaf_view_simple_methods); yaf_view_simple_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\View\\Simple", yaf_view_simple_ce); zend_declare_property_null(yaf_view_simple_ce, ZEND_STRL(YAF_VIEW_PROPERTY_NAME_TPLVARS), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_view_simple_ce, ZEND_STRL(YAF_VIEW_PROPERTY_NAME_TPLDIR), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf.c b/yaf.c index d2a9b86a..c7c03eaf 100644 --- a/yaf.c +++ b/yaf.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf.c 327514 2012-09-07 04:31:34Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -78,6 +78,9 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("yaf.st_compatible", "0", PHP_INI_ALL, OnUpdateBool, st_compatible, zend_yaf_globals, yaf_globals) /* }}} */ STD_PHP_INI_ENTRY("yaf.environ", "product", PHP_INI_SYSTEM, OnUpdateString, environ, zend_yaf_globals, yaf_globals) +#ifdef YAF_HAVE_NAMESPACE + STD_PHP_INI_BOOLEAN("yaf.use_namespace", "0", PHP_INI_SYSTEM, OnUpdateBool, use_namespace, zend_yaf_globals, yaf_globals) +#endif PHP_INI_END(); /* }}} */ diff --git a/yaf_action.c b/yaf_action.c index 94f3c1ee..68d0461a 100644 --- a/yaf_action.c +++ b/yaf_action.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_action.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_action.c 321289 2011-12-21 02:53:29Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -61,11 +61,9 @@ zend_function_entry yaf_action_methods[] = { */ YAF_STARTUP_FUNCTION(action) { zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Action_Abstract", yaf_action_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Action_Abstract", "Yaf\\Action_Abstract", yaf_action_methods); yaf_action_ce = zend_register_internal_class_ex(&ce, yaf_controller_ce, NULL TSRMLS_CC); yaf_action_ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Action_Abstract", yaf_action_ce); zend_declare_property_null(yaf_action_ce, ZEND_STRL(YAF_ACTION_PROPERTY_NAME_CTRL), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_application.c b/yaf_application.c index ff11722a..6d33c19a 100644 --- a/yaf_application.c +++ b/yaf_application.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_application.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_application.c 327549 2012-09-09 03:02:48Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -750,11 +750,10 @@ zend_function_entry yaf_application_methods[] = { */ YAF_STARTUP_FUNCTION(application) { zend_class_entry ce; + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Application", "Yaf\\Application", yaf_application_methods); - INIT_CLASS_ENTRY(ce, "Yaf_Application", yaf_application_methods); - yaf_application_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); + yaf_application_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_application_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Application", yaf_application_ce); zend_declare_property_null(yaf_application_ce, ZEND_STRL(YAF_APPLICATION_PROPERTY_NAME_CONFIG), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_application_ce, ZEND_STRL(YAF_APPLICATION_PROPERTY_NAME_DISPATCHER), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_bootstrap.c b/yaf_bootstrap.c index 2d9f4f46..35ea86de 100644 --- a/yaf_bootstrap.c +++ b/yaf_bootstrap.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_bootstrap.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_bootstrap.c 321289 2011-12-21 02:53:29Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -41,10 +41,9 @@ zend_function_entry yaf_bootstrap_methods[] = { YAF_STARTUP_FUNCTION(bootstrap) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Bootstrap_Abstract", yaf_bootstrap_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Bootstrap_Abstract", "Yaf\\Bootstrap_Abstract", yaf_bootstrap_methods); yaf_bootstrap_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_bootstrap_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Bootstrap_Abstract", yaf_bootstrap_ce); return SUCCESS; } diff --git a/yaf_config.c b/yaf_config.c index 8bc7dfb1..3070aba6 100644 --- a/yaf_config.c +++ b/yaf_config.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_config.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_config.c 327559 2012-09-09 06:05:25Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -379,10 +379,9 @@ zend_function_entry yaf_config_methods[] = { YAF_STARTUP_FUNCTION(config) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Config_Abstract", yaf_config_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Config_Abstract", "Yaf\\Config_Abstract", yaf_config_methods); yaf_config_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_config_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Config_Abstract", yaf_config_ce); zend_declare_property_null(yaf_config_ce, ZEND_STRL(YAF_CONFIG_PROPERT_NAME), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_bool(yaf_config_ce, ZEND_STRL(YAF_CONFIG_PROPERT_NAME_READONLY), 1, ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_controller.c b/yaf_controller.c index c30d7f0b..2c2bf752 100644 --- a/yaf_controller.c +++ b/yaf_controller.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_controller.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_controller.c 327561 2012-09-09 06:30:22Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -564,11 +564,9 @@ zend_function_entry yaf_controller_methods[] = { */ YAF_STARTUP_FUNCTION(controller) { zend_class_entry ce; - - INIT_CLASS_ENTRY(ce, "Yaf_Controller_Abstract", yaf_controller_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Controller_Abstract", "Yaf\\Controller_Abstract", yaf_controller_methods); yaf_controller_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_controller_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Controller_Abstract", yaf_controller_ce); zend_declare_property_null(yaf_controller_ce, ZEND_STRL(YAF_CONTROLLER_PROPERTY_NAME_ACTIONS), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(yaf_controller_ce, ZEND_STRL(YAF_CONTROLLER_PROPERTY_NAME_MODULE), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_dispatcher.c b/yaf_dispatcher.c index aae57969..4b5f9b8a 100644 --- a/yaf_dispatcher.c +++ b/yaf_dispatcher.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_dispatcher.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_dispatcher.c 327562 2012-09-09 06:54:44Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1364,10 +1364,10 @@ zend_function_entry yaf_dispatcher_methods[] = { YAF_STARTUP_FUNCTION(dispatcher) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Dispatcher", yaf_dispatcher_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Dispatcher", "Yaf\\Dispatcher", yaf_dispatcher_methods); + yaf_dispatcher_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_dispatcher_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Dispatcher", yaf_dispatcher_ce); zend_declare_property_null(yaf_dispatcher_ce, ZEND_STRL(YAF_DISPATCHER_PROPERTY_NAME_ROUTER), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_dispatcher_ce, ZEND_STRL(YAF_DISPATCHER_PROPERTY_NAME_VIEW), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_exception.c b/yaf_exception.c index 6d7536d2..a6dc24fc 100644 --- a/yaf_exception.c +++ b/yaf_exception.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_exception.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_exception.c 325512 2012-05-03 08:22:37Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -166,49 +166,38 @@ YAF_STARTUP_FUNCTION(exception) { zend_class_entry view_notfound_ce; zend_class_entry type_ce; - INIT_CLASS_ENTRY(ce, "Yaf_Exception", yaf_exception_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Exception", "Yaf\\Exception", yaf_exception_methods); yaf_exception_ce = zend_register_internal_class_ex(&ce, yaf_get_exception_base(0 TSRMLS_CC), NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception", yaf_exception_ce); - zend_declare_property_null(yaf_exception_ce, ZEND_STRL("message"), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_long(yaf_exception_ce, ZEND_STRL("code"), 0, ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_exception_ce, ZEND_STRL("previous"), ZEND_ACC_PROTECTED TSRMLS_CC); - INIT_CLASS_ENTRY(startup_ce, "Yaf_Exception_StartupError", NULL); + YAF_INIT_CLASS_ENTRY(startup_ce, "Yaf_Exception_StartupError", "Yaf\\Exception\\StartupError", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_STARTUP_FAILED)] = zend_register_internal_class_ex(&startup_ce, yaf_exception_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\StartupError", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_STARTUP_FAILED)]); - INIT_CLASS_ENTRY(route_ce, "Yaf_Exception_RouterFailed", NULL); + YAF_INIT_CLASS_ENTRY(route_ce, "Yaf_Exception_RouterFailed", "Yaf\\Exception\\RouterFailed", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_ROUTE_FAILED)] = zend_register_internal_class_ex(&route_ce, yaf_exception_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\RouterFailed", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_ROUTE_FAILED)]); - INIT_CLASS_ENTRY(dispatch_ce, "Yaf_Exception_DispatchFailed", NULL); + YAF_INIT_CLASS_ENTRY(dispatch_ce, "Yaf_Exception_DispatchFailed", "Yaf\\Exception\\DispatchFailed", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_DISPATCH_FAILED)] = zend_register_internal_class_ex(&dispatch_ce, yaf_exception_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\DispatchFailed", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_DISPATCH_FAILED)]); - INIT_CLASS_ENTRY(loader_ce, "Yaf_Exception_LoadFailed", NULL); + YAF_INIT_CLASS_ENTRY(loader_ce, "Yaf_Exception_LoadFailed", "Yaf\\Exception\\LoadFailed", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_AUTOLOAD_FAILED)] = zend_register_internal_class_ex(&loader_ce, yaf_exception_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\LoadFailed", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_AUTOLOAD_FAILED)]); - INIT_CLASS_ENTRY(module_notfound_ce, "Yaf_Exception_LoadFailed_Module", NULL); + YAF_INIT_CLASS_ENTRY(module_notfound_ce, "Yaf_Exception_LoadFailed_Module", "Yaf\\Exception\\LoadFailed\\Module", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_MODULE)] = zend_register_internal_class_ex(&module_notfound_ce, yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_AUTOLOAD_FAILED)], NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\LoadFailed\\Module", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_MODULE)]); - INIT_CLASS_ENTRY(controller_notfound_ce, "Yaf_Exception_LoadFailed_Controller", NULL); + YAF_INIT_CLASS_ENTRY(controller_notfound_ce, "Yaf_Exception_LoadFailed_Controller", "Yaf\\Exception\\LoadFailed\\Controller", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_CONTROLLER)] = zend_register_internal_class_ex(&controller_notfound_ce, yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_AUTOLOAD_FAILED)], NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\LoadFailed\\Controller", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_CONTROLLER)]); - INIT_CLASS_ENTRY(action_notfound_ce, "Yaf_Exception_LoadFailed_Action", NULL); + YAF_INIT_CLASS_ENTRY(action_notfound_ce, "Yaf_Exception_LoadFailed_Action", "Yaf\\Exception\\LoadFailed\\Action", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_ACTION)] = zend_register_internal_class_ex(&action_notfound_ce, yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_AUTOLOAD_FAILED)], NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\LoadFailed\\Action", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_ACTION)]); - INIT_CLASS_ENTRY(view_notfound_ce, "Yaf_Exception_LoadFailed_View", NULL); + YAF_INIT_CLASS_ENTRY(view_notfound_ce, "Yaf_Exception_LoadFailed_View", "Yaf\\Exception\\LoadFailed\\View", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_VIEW)] = zend_register_internal_class_ex(&view_notfound_ce, yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_AUTOLOAD_FAILED)], NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\LoadFailed\\View", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_NOTFOUND_VIEW)]); - INIT_CLASS_ENTRY(type_ce, "Yaf_Exception_TypeError", NULL); + YAF_INIT_CLASS_ENTRY(type_ce, "Yaf_Exception_TypeError", "Yaf\\Exception\\TypeError", NULL); yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_TYPE_ERROR)] = zend_register_internal_class_ex(&type_ce, yaf_exception_ce, NULL TSRMLS_CC); - YAF_INIT_CLASS_ALIAS("Yaf\\Exception\\TypeError", yaf_buildin_exceptions[YAF_EXCEPTION_OFFSET(YAF_ERR_TYPE_ERROR)]); return SUCCESS; } diff --git a/yaf_loader.c b/yaf_loader.c index 26a072c2..7215de4e 100644 --- a/yaf_loader.c +++ b/yaf_loader.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_loader.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_loader.c 327560 2012-09-09 06:09:27Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -987,10 +987,9 @@ zend_function_entry yaf_loader_methods[] = { YAF_STARTUP_FUNCTION(loader) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Loader", yaf_loader_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Loader", "Yaf\\Loader", yaf_loader_methods); yaf_loader_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_loader_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Loader", yaf_loader_ce); zend_declare_property_null(yaf_loader_ce, ZEND_STRL(YAF_LOADER_PROPERTY_NAME_LIBRARY), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_loader_ce, ZEND_STRL(YAF_LOADER_PROPERTY_NAME_GLOBAL_LIB), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_namespace.h b/yaf_namespace.h index fbdd971b..40df2c98 100644 --- a/yaf_namespace.h +++ b/yaf_namespace.h @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_namespace.h 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_namespace.h 321289 2011-12-21 02:53:29Z laruence $ */ #ifndef YAF_NAMESPACE_H #define YAF_NAMESPACE_H @@ -23,19 +23,26 @@ #define YAF_BEGIN_ARG_INFO ZEND_BEGIN_ARG_INFO #define YAF_BEGIN_ARG_INFO_EX ZEND_BEGIN_ARG_INFO_EX -#define YAF_INIT_CLASS_ALIAS(name, ce) \ - do {\ - zend_register_class_alias_ex(name, sizeof(name) - 1, ce TSRMLS_CC); \ - } while(0) +#define namespace_switch(n) \ + (YAF_G(use_namespace)? n##_ns : n) + +#define YAF_INIT_CLASS_ENTRY(ce, name, name_ns, methods) \ + if(YAF_G(use_namespace)) { \ + INIT_CLASS_ENTRY(ce, name_ns, methods); \ + } else { \ + INIT_CLASS_ENTRY(ce, name, methods); \ + } #else #ifdef YAF_HAVE_NAMESPACE #undef YAF_HAVE_NAMESPACE #endif -#define YAF_INIT_CLASS_ALIAS(name, ce) +#define namespace_switch(n) (n) +#define YAF_INIT_CLASS_ENTRY(ce, name, name_ns, methods) INIT_CLASS_ENTRY(ce, name, methods) #define YAF_BEGIN_ARG_INFO static ZEND_BEGIN_ARG_INFO #define YAF_BEGIN_ARG_INFO_EX static ZEND_BEGIN_ARG_INFO_EX + #endif #define YAF_END_ARG_INFO ZEND_END_ARG_INFO diff --git a/yaf_plugin.c b/yaf_plugin.c index c22c578b..50aadabe 100644 --- a/yaf_plugin.c +++ b/yaf_plugin.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_plugin.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_plugin.c 321289 2011-12-21 02:53:29Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -42,6 +42,13 @@ ZEND_BEGIN_ARG_INFO_EX(plugin_arg, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, request, Yaf_Request_Abstract, 0) ZEND_ARG_OBJ_INFO(0, response, Yaf_Response_Abstract, 0) ZEND_END_ARG_INFO() + +#ifdef YAF_HAVE_NAMESPACE +ZEND_BEGIN_ARG_INFO_EX(plugin_arg_ns, 0, 0, 2) + ZEND_ARG_OBJ_INFO(0, request, Yaf\\Request_Abstract, 0) + ZEND_ARG_OBJ_INFO(0, response, Yaf\\Response_Abstract, 0) +ZEND_END_ARG_INFO() +#endif /* }}} */ /** {{{ proto public Yaf_Plugin::routerStartup(Yaf_Request_Abstract $request, Yaf_Response_Abstarct $response) @@ -97,24 +104,36 @@ PHP_METHOD(yaf_plugin, preResponse) { */ zend_function_entry yaf_plugin_methods[] = { PHP_ME(yaf_plugin, routerStartup, plugin_arg, ZEND_ACC_PUBLIC) - PHP_ME(yaf_plugin, routerShutdown, plugin_arg, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, routerShutdown, plugin_arg, ZEND_ACC_PUBLIC) PHP_ME(yaf_plugin, dispatchLoopStartup, plugin_arg, ZEND_ACC_PUBLIC) PHP_ME(yaf_plugin, dispatchLoopShutdown, plugin_arg, ZEND_ACC_PUBLIC) PHP_ME(yaf_plugin, preDispatch, plugin_arg, ZEND_ACC_PUBLIC) PHP_ME(yaf_plugin, postDispatch, plugin_arg, ZEND_ACC_PUBLIC) - PHP_ME(yaf_plugin, preResponse, plugin_arg, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, preResponse, plugin_arg, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; + +#ifdef YAF_HAVE_NAMESPACE +zend_function_entry yaf_plugin_methods_ns[] = { + PHP_ME(yaf_plugin, routerStartup, plugin_arg_ns, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, routerShutdown, plugin_arg_ns, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, dispatchLoopStartup, plugin_arg_ns, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, dispatchLoopShutdown, plugin_arg_ns, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, preDispatch, plugin_arg_ns, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, postDispatch, plugin_arg_ns, ZEND_ACC_PUBLIC) + PHP_ME(yaf_plugin, preResponse, plugin_arg_ns, ZEND_ACC_PUBLIC) + {NULL, NULL, NULL} +}; +#endif /* }}} */ /** {{{ YAF_STARTUP_FUNCTION */ YAF_STARTUP_FUNCTION(plugin) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Plugin_Abstract", yaf_plugin_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Plugin_Abstract", "Yaf\\Plugin_Abstract", namespace_switch(yaf_plugin_methods)); yaf_plugin_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_plugin_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Plugin_Abstract", yaf_plugin_ce); return SUCCESS; } diff --git a/yaf_registry.c b/yaf_registry.c index f90fcd59..8e0f0647 100644 --- a/yaf_registry.c +++ b/yaf_registry.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_registry.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_registry.c 321289 2011-12-21 02:53:29Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -208,10 +208,10 @@ zend_function_entry yaf_registry_methods[] = { YAF_STARTUP_FUNCTION(registry) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Registry", yaf_registry_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Registry", "Yaf\\Registry", yaf_registry_methods); + yaf_registry_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_registry_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Registry", yaf_registry_ce); zend_declare_property_null(yaf_registry_ce, ZEND_STRL(YAF_REGISTRY_PROPERTY_NAME_INSTANCE), ZEND_ACC_PROTECTED|ZEND_ACC_STATIC TSRMLS_CC); zend_declare_property_null(yaf_registry_ce, ZEND_STRL(YAF_REGISTRY_PROPERTY_NAME_ENTRYS), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_request.c b/yaf_request.c index df9716c1..778fbe71 100644 --- a/yaf_request.c +++ b/yaf_request.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_request.c 327565 2012-09-09 07:48:24Z laruence $*/ +/* $Id: yaf_request.c 327552 2012-09-09 03:52:28Z laruence $*/ #ifdef HAVE_CONFIG_H #include "config.h" @@ -824,10 +824,9 @@ zend_function_entry yaf_request_methods[] = { YAF_STARTUP_FUNCTION(request){ zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Request_Abstract", yaf_request_methods); - yaf_request_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Request_Abstract", "Yaf\\Request_Abstract", yaf_request_methods); + yaf_request_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_request_ce->ce_flags = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Request_Abstract", yaf_request_ce); zend_declare_property_null(yaf_request_ce, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_MODULE), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_null(yaf_request_ce, ZEND_STRL(YAF_REQUEST_PROPERTY_NAME_CONTROLLER), ZEND_ACC_PUBLIC TSRMLS_CC); diff --git a/yaf_response.c b/yaf_response.c index ae63584b..6ef230c7 100644 --- a/yaf_response.c +++ b/yaf_response.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_response.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_response.c 327560 2012-09-09 06:09:27Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -458,10 +458,10 @@ zend_function_entry yaf_response_methods[] = { YAF_STARTUP_FUNCTION(response) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Response_Abstract", yaf_response_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Response_Abstract", "Yaf\\Response_Abstract", yaf_response_methods); + yaf_response_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_response_ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Response_Abstract", yaf_response_ce); zend_declare_property_null(yaf_response_ce, ZEND_STRL(YAF_RESPONSE_PROPERTY_NAME_HEADER), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_response_ce, ZEND_STRL(YAF_RESPONSE_PROPERTY_NAME_BODY), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_router.c b/yaf_router.c index fa552636..3817b028 100644 --- a/yaf_router.c +++ b/yaf_router.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_router.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_router.c 327425 2012-09-02 03:58:49Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -363,10 +363,10 @@ zend_function_entry yaf_router_methods[] = { YAF_STARTUP_FUNCTION(router) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Router", yaf_router_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Router", "Yaf\\Router", yaf_router_methods); yaf_router_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); + yaf_router_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Router", yaf_router_ce); zend_declare_property_null(yaf_router_ce, ZEND_STRL(YAF_ROUTER_PROPERTY_NAME_ROUTERS), ZEND_ACC_PROTECTED TSRMLS_CC); zend_declare_property_null(yaf_router_ce, ZEND_STRL(YAF_ROUTER_PROPERTY_NAME_CURRENT_ROUTE), ZEND_ACC_PROTECTED TSRMLS_CC); diff --git a/yaf_session.c b/yaf_session.c index ae36386d..ac60f0e7 100644 --- a/yaf_session.c +++ b/yaf_session.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: yaf_session.c 327565 2012-09-09 07:48:24Z laruence $ */ +/* $Id: yaf_session.c 327425 2012-09-02 03:58:49Z laruence $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -353,10 +353,10 @@ zend_function_entry yaf_session_methods[] = { YAF_STARTUP_FUNCTION(session) { zend_class_entry ce; - INIT_CLASS_ENTRY(ce, "Yaf_Session", yaf_session_methods); + YAF_INIT_CLASS_ENTRY(ce, "Yaf_Session", "Yaf\\Session", yaf_session_methods); + yaf_session_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); yaf_session_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; - YAF_INIT_CLASS_ALIAS("Yaf\\Session", yaf_session_ce); #ifdef HAVE_SPL zend_class_implements(yaf_session_ce TSRMLS_CC, 3, zend_ce_iterator, zend_ce_arrayaccess, spl_ce_Countable);