com php-src: Throwable method signatures.: Zend/zend_interfac es.c sapi/cli/tests/005.phpt

From: Date: Mon, 18 May 2015 19:29:51 +0000
Subject: com php-src: Throwable method signatures.: Zend/zend_interfac es.c sapi/cli/tests/005.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87335@lists.php.net to get a copy of this message
Commit: 5c54bf015dc4fd930394709d80665d9a731f6f99 Author: Aaron Piotrowski <aaron@trowski.com> Mon, 18 May 2015 14:29:51 -0500 Parents: 99640cd013c9d32d21eb7de105fd159f8930ff0d Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5c54bf015dc4fd930394709d80665d9a731f6f99 Log: Throwable method signatures. Changed paths: M Zend/zend_interfaces.c M sapi/cli/tests/005.phpt Diff: diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces..c index 2b8f8a2..3d8398d 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -509,7 +509,7 @@ static int zend_implement_throwable(zend_class_entry *interface, zend_class_entr if (instanceof_function(class_type, zend_exception_get_default()) || instanceof_function(class_type, zend_get_error())) { return SUCCESS; } - zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception instead", + zend_error_noreturn(E_CORE_ERROR, "Class %s cannot implement interface %s, extend Exception or Error instead", class_type->name->val, interface->name->val); return FAILURE; @@ -565,7 +565,17 @@ const zend_function_entry zend_funcs_serializable[] = { }; /* }}} */ -const zend_function_entry *zend_funcs_throwable = NULL; +const zend_function_entry zend_funcs_throwable[] = { + ZEND_ABSTRACT_ME(throwable, getMessage, NULL) + ZEND_ABSTRACT_ME(throwable, getCode, NULL) + ZEND_ABSTRACT_ME(throwable, getFile, NULL) + ZEND_ABSTRACT_ME(throwable, getLine, NULL) + ZEND_ABSTRACT_ME(throwable, getTrace, NULL) + ZEND_ABSTRACT_ME(throwable, getPrevious, NULL) + ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL) + ZEND_ABSTRACT_ME(throwable, __toString, NULL) + ZEND_FE_END +}; #define REGISTER_ITERATOR_INTERFACE(class_name, class_name_str) \ {\ diff --git a/sapi/cli/tests/005..phpt b/sapi/cli/tests/005.phpt index 051605f..60af3fc 100644 --- a/sapi/cli/tests/005.phpt +++ b/sapi/cli/tests/005.phpt @@ -40,7 +40,7 @@ string(183) "Class [ <internal:Core> class stdClass ] { } " -string(1376) "Class [ <internal:Core> class Exception implements Throwable ] { +string(1544) "Class [ <internal:Core> class Exception implements Throwable ] { - Constants [0] { } @@ -74,28 +74,28 @@ string(1376) "Class [ <internal:Core> class Exception implements Throwable ] { } } - Method [ <internal:Core> final public method getMessage ] { + Method [ <internal:Core, prototype Throwable> final public method getMessage ] { } - Method [ <internal:Core> final public method getCode ] { + Method [ <internal:Core, prototype Throwable> final public method getCode ] { } - Method [ <internal:Core> final public method getFile ] { + Method [ <internal:Core, prototype Throwable> final public method getFile ] { } - Method [ <internal:Core> final public method getLine ] { + Method [ <internal:Core, prototype Throwable> final public method getLine ] { } - Method [ <internal:Core> final public method getTrace ] { + Method [ <internal:Core, prototype Throwable> final public method getTrace ] { } - Method [ <internal:Core> final public method getPrevious ] { + Method [ <internal:Core, prototype Throwable> final public method getPrevious ] { } - Method [ <internal:Core> final public method getTraceAsString ] { + Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] { } - Method [ <internal:Core> public method __toString ] { + Method [ <internal:Core, prototype Throwable> public method __toString ] { } } }

« previous php.cvs (#87335) next »