Dmitry Stogov
30f4d3f959
Fixed bug #38220 (Crash on some object operations)
2006-07-26 15:29:27 +00:00
Zeev Suraski
51d495850a
Restore ZE1 compatibility mode (Zend Engine part - the modules patches
...
will follow later today)
2006-06-05 13:58:52 +00:00
Dmitry Stogov
51e52e20ef
Support for nested exceptions and fatal errors in destructors
2006-05-31 12:59:31 +00:00
Marcus Boerger
290ed55060
- MFH Improved error message
2006-05-20 21:02:44 +00:00
Marcus Boerger
637a40423c
- MFH as discussed
...
. zend_exception_get_default() -> zend_exception_get_default(TSRMLS_D)
. zend_get_error_exception() -> zend_get_error_exception(TSRMLS_D)
. added E_RECOVERABLE_ERROR
. added ZEND_TOSTRING_FUNC_NAME
. added __tostring function cache to zend_class_entry
. added ZEND_NAMED_ME
. modified ZEND_ME_MAPPING to support method flags
. added ZEND_MN
. method entries now use prefix "zim_" instead of "zif_"
. drop EG(ze1_compatibility_mode)
. changed cast handler, now without (int should_free):
typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
. changed get_iterator, now receives whether value is by ref:
zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
. added zend_objects_store_add_ref_by_handle
. added zend_objects_store_del_ref_by_handle
. convert_to_explicit_type(pzv, type)
2006-05-09 23:53:23 +00:00
Antony Dovgal
59b8592c8c
fix bug #36898 (__set() leaks in classes extending internal ones)
...
Added:
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
to initialize and destroy zend_object structs
2006-03-29 14:28:43 +00:00
Andi Gutmans
61e93ccfe8
- Update copyright notices to 2006
2006-01-04 23:53:05 +00:00
Dmitry Stogov
64931b62cc
Allow recursive calls to __get/__set for different properties
2005-11-15 13:35:23 +00:00
Dmitry Stogov
23e4102e95
Fixed clone bug in ze1_compatibilty mode
2005-08-04 08:36:54 +00:00
foobar
916815b779
Bump up the year
2005-08-03 13:30:58 +00:00
Dmitry Stogov
345e0255b5
Fixed bug #33512 (Add missing support for isset()/unset() overloading to complement the property get/set methods)
2005-07-07 16:07:09 +00:00
Ilia Alshanetsky
7e8bd05c89
Fixed ZTS build.
2005-06-07 14:01:36 +00:00
Dmitry Stogov
055e889bbd
Fixed bug #33243 (ze1_compatibility_mode does not work as expected)
2005-06-07 07:03:28 +00:00
Andi Gutmans
8140f095c6
- Revert following patch until we decide what is the right way to handle
...
- this:
- Fix signatures they are all meant to be able to deal with any type in any
object storage (though we are still missing several parts)
2005-02-24 02:35:59 +00:00
Marcus Boerger
3096f1edac
- Fix signatures they are all meant to be able to deal with any type in any
...
object storage (though we are still missing several parts)
2005-02-22 12:06:59 +00:00
Marcus Boerger
e39f3f3f48
Simplify/Optmize magic method calls (__get/__set/__call/__clone/__destruct)
2004-09-28 22:55:22 +00:00
Marcus Boerger
dd5652e4c1
- Fix handling of exceptions in dtors
2004-09-06 19:13:33 +00:00
Andi Gutmans
3333380bf0
- Improve fix for protecting destructor's from exceptions.
...
- I was killing the current exception completely which was wrong.
2004-03-02 08:13:15 +00:00
Andi Gutmans
8912a50bf4
- Fix crash in destructors(). You can't throw an exception in destructors
...
as there is no guaranteed time when the destructor will be called.
2004-03-01 19:45:07 +00:00
Zeev Suraski
3ac58bffcf
- Small fixes
2004-02-04 11:56:07 +00:00
Zeev Suraski
f5f7d569a0
Change destructor implementation (details will follow on internals@)
2004-02-04 09:56:20 +00:00
Marcus Boerger
363c587871
Nuke unused variable
2004-02-03 21:15:08 +00:00
Zeev Suraski
848d4aed8a
Perform a bitwise copy of the object even when __clone() is defined.
...
__clone() is back to not requiring any arguments, as $that is no longer
needed ($this already contains a copy of the original object, by the time
we __clone() is executed).
Calling the parent clone is done using parent::__clone()
2004-02-03 12:36:13 +00:00
Zeev Suraski
8e30d96ad8
Redesign the clone() feature to fix some fundamental flaws in the previous
...
implementation.
Using clone directly is now done using
$replica = clone $src;
Clone methods must now be declared as follows:
function __clone($that)
{
}
Clone methods in derived classes can call the __clone method of their parent
classes using parent::__clone($that)
2004-02-02 12:28:19 +00:00
foobar
ccfc46b0aa
- Happy new year and PHP 5 for rest of the files too..
...
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Marcus Boerger
e20f534ee5
Simplify
2003-12-27 20:33:14 +00:00
Marcus Boerger
9702c70a35
Synch/Unify error messages related to function/method calls
2003-09-02 14:08:59 +00:00
Marcus Boerger
d4aa155d25
Precise destructor errors
2003-08-09 14:32:33 +00:00
Stanislav Malyshev
9fa2d52310
make clone and throw coexist peacefully
2003-07-27 13:20:31 +00:00
Marcus Boerger
7cdc2d1f39
Shuffle code to ease writing clone handlers
2003-07-19 09:47:00 +00:00
Marcus Boerger
5b54322dc7
Temporairy solution to overcome shutdown propbelms with objects that have
...
hidden destructors.
#
# If we set the error level to E_ERROR what we must to to be correct and an
# object needs to be automatically destructed in shutdown process then the
# exit would cause memory corruption and a SEGV.
2003-07-02 23:58:47 +00:00
Marcus Boerger
669016c724
Reorganize this a bit to ensure the object memory is destructed before
...
showing the error.
2003-07-02 23:53:53 +00:00
Marcus Boerger
74a0f6c8ab
Finally fix property cloning and fix the tests accordingly.
...
# The default behaviour is to copy all properties with all current values
# from the old object. But if __clone is overwritten then only the default
# properties are cloned with their correct default values. So we keep
# the type system intact and also allow real __clone overwriting now.
2003-07-02 07:24:11 +00:00
Marcus Boerger
5500287432
Fix __clone().
...
# This is somewhat discussable. I copied all properties from the old to the
# new object. But for type correctness we only need to copy the properties
# declared in the class and its parents.
#
# Also someone might want to take care about static and const members.
2003-07-01 23:29:36 +00:00
Marcus Boerger
35c40932e8
Fix destructor visibility
2003-07-01 19:13:50 +00:00
James Cox
f68c7ff249
updating license information in the headers.
2003-06-10 20:04:29 +00:00
Sebastian Bergmann
866332a4b8
Eliminate TSRMLS_FETCH() calls in zend_objects_new() and zend_objects_get_address().
2003-03-26 06:32:53 +00:00
foobar
333406bdc2
- Added some missing CVS $Id$ tags, headers and footers.
2003-02-01 01:49:15 +00:00
Harald Radi
46306a3212
export zend_objects_destroy_object()
...
static inline was meaningless anyways as the function
was only used as a callback handler and was never
called directly
2003-01-17 23:59:15 +00:00
Andi Gutmans
f7f9721bdb
- Change the automatically created variable $clone in __clone() to
...
- $that as discussed at the PHP Conference. If there are any objections
- alternative names please let me know. The reason for changing it from
- $clone is because $clone sounds as if it's the newly cloned object and
- not the old one.
2002-11-05 18:16:11 +00:00
Stanislav Malyshev
d8651c82cd
Support for __get, __set and __call in classes.
...
This should work as follows: if class hasn't member with given name,
__get/__set is called. If class has no method with given name, __call is called.
__get/__set are not recursive, __call can be.
2002-09-04 09:07:58 +00:00
Sebastian Bergmann
646292e08b
Fix warning.
2002-08-08 18:50:46 +00:00
Stanislav Malyshev
11fb07a360
Add ZEND_API to functions
2002-08-08 17:53:32 +00:00
Andi Gutmans
4a52b98835
- Export zend_object_get_address()
2002-07-01 04:21:40 +00:00
Andi Gutmans
b53569c9e8
- Nuke persist_alloc().
2002-06-22 13:52:07 +00:00
Andi Gutmans
478ed1cf82
- Fix build
2002-05-31 14:32:19 +00:00
Stanislav Malyshev
f75f3cff82
Generalize object storage and reference bookkeeping
2002-05-31 12:09:19 +00:00
Andi Gutmans
1fe8df14c6
- constructor_called is supposed to be destructor_called
2002-05-14 16:15:50 +00:00
Andi Gutmans
c84a4ead95
- Pass TSRMLS to callbacks.
2002-03-15 16:26:17 +00:00
Andi Gutmans
2505f6b400
- Fix crash reported by Sebastian when destructor function causes a fatal
...
- error. I hope this does it and we don't find any other problems.
2002-03-01 10:26:10 +00:00