Commit Graph

190 Commits

Author SHA1 Message Date
Zeev Suraski
e062dffe6c - Implement public/protected/private methods.
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-06 17:09:44 +00:00
Andi Gutmans
27de54b0df - MFZE1 2002-12-01 19:47:02 +00:00
Andi Gutmans
f222884e2d - Revert as the patch doesn't compile 2002-12-01 19:22:30 +00:00
Andi Gutmans
b6ecd6704c - MFZE1 2002-12-01 19:07:07 +00:00
Zeev Suraski
4be862b02c MFZE1 - error_reporting fix 2002-11-19 17:51:30 +00:00
Ilia Alshanetsky
32e8ee9bee MFZE1 2002-11-11 16:32:57 +00:00
Zeev Suraski
bd115087e3 MFZE1 - connection_status() fix 2002-09-19 15:58:01 +00:00
Zeev Suraski
711be83d49 MFZE1 - threading fix 2002-09-17 12:42:11 +00:00
Andi Gutmans
e3ca0ff0b8 - Prepare for alpha 3 2002-09-08 15:33:54 +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
Zeev Suraski
e801a99a50 MFZE1 2002-09-03 10:25:06 +00:00
Sebastian Bergmann
cfad3c664f Add html_errors to zend_utility_values. Patch by Jan Lehnardt <jan@php.net>. 2002-09-03 09:41:41 +00:00
Zeev Suraski
88d3154b68 MFZE1 2002-08-13 15:14:45 +00:00
Derick Rethans
0650a59aea - MFZE1 - MacOSX fixes by Marko Karppinen 2002-07-18 11:16:34 +00:00
Andi Gutmans
bc5ea87e28 - Commit patch to support protected member variables (by Timm Friebe w/
- some fixes by me).
- You can't access protected variables from outside the object. If you want
- to see a protected member from your ancestors you need to declare the
- member as protected in the class you want to use it in. You can't
- redeclare a protected variable as private nor the other way around.
2002-07-15 18:09:56 +00:00
Andi Gutmans
f24cb9731c - Get ready for alpha2 2002-06-29 19:37:10 +00:00
Andi Gutmans
6339bd5912 - Fix bug 15037
- Bump version to alpha2-dev
2002-06-29 07:35:41 +00:00
Andi Gutmans
ba72dbf37a - MFZE1 2002-06-24 07:11:12 +00:00
Andi Gutmans
90f43c78b0 - This should improve performance on Windows 2002-06-08 13:01:05 +00:00
Venkat Raghavan S
bc95839f19 NetWare changes 2002-05-30 08:52:21 +00:00
Andi Gutmans
7e5ec2d761 Initial support for built-in backtracing.
There are still a few problems such as includes and calling other functions
from internal functions which aren't seen (will have to think if and how to
fix this).
Also the main scripts filename isn't available. Need to think about that.
2002-05-02 17:20:48 +00:00
Harald Radi
51e797f1e3 some type cleanup work 2002-04-23 18:06:54 +00:00
Stanislav Malyshev
a68b448169 make compatible with current PHP 2002-04-07 17:12:38 +00:00
Harald Radi
d5e64b2287 added thread safe hashtable which allows concurrent
reads but only exclusive writes
2002-03-20 21:26:46 +00:00
Andi Gutmans
a990c4da3e - Finish covering all parsed methods to check for validity in parser.
- Change zval's refcount to zend_uint (If it doesn't slow down the Engine
- too much it should probably stay this way). If anyone has time to test
- the difference in speed between zend_ushort & zend_uint in zend.h of
- the struct _zval_struct (one line change) I'd be glad to get some
- figures.
2002-03-19 19:09:53 +00:00
Andi Gutmans
0ee65254ee - Forgot to close comment. 2002-03-12 19:41:02 +00:00
Andi Gutmans
9760fdcb37 - Macro for duality between Engine 1 and 2 2002-03-12 19:36:24 +00:00
Andi Gutmans
fb6976e46d - Another couple of indirection fixes.
- Make class_entry->refcount be part of the structure and not allocated.
2002-03-12 19:22:29 +00:00
Stanislav Malyshev
92dd5e611b - make class tables contain class_entry *, not class_entry
- fix isset($this)
2002-03-12 10:08:47 +00:00
Andi Gutmans
00e90f2ff3 - Experimental support for private members.
<?
	class MyClass {
		private $Hello = "Hello, World!\n";

		function printHello()
		{
			print $this->Hello;
		}
	}

	class MyClass2 extends MyClass {
		function printHello()
		{
			MyClass::printHello(); /* Should print */
			print $this->Hello; /* Shouldn't print out anything */
		}
	}

	$obj = new MyClass();
	print $obj->Hello; /* Shouldn't print out anything */
	$obj->printHello(); /* Should print */

	$obj = new MyClass2();
	print $obj->Hello; /* Shouldn't print out anything */
	$obj->printHello();
?>
2002-02-21 11:50:44 +00:00
Stanislav Malyshev
cefbdccb98 Pass TSRM to create_object 2002-02-14 09:20:51 +00:00
Stanislav Malyshev
6608f07322 Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +00:00
Sebastian Bergmann
62dc854bb0 Happy New Year. 2002-01-06 15:21:36 +00:00
Andi Gutmans
8a0c756c58 - #define to help #ifdef stuff in PHP sources to make them work w/ ZE1 and
- 2
2001-12-29 18:07:08 +00:00
Andi Gutmans
73b159e056 - Experimental support for destructors. We need to see if destructors
- will actually work well in the context of PHP so we should consider this
- as experimental. Possible problems might be that when the constructor is
- run PHP might not be in a stable state.
2001-12-27 14:35:09 +00:00
Andi Gutmans
29ea3da2f8 - Pretty much finish _clone() support 2001-12-26 19:54:20 +00:00
Andi Gutmans
f4b832d277 - Fix crash bug in startup code.
- Start work on being able to reference global and local scope
2001-12-13 16:55:04 +00:00
Andi Gutmans
74efc41fc3 - Make classes have scope and function/constant lookups default to the class 2001-12-12 17:38:37 +00:00
Andi Gutmans
4cb97fa3b9 - Rename zend_class_entry.constants -> zend_class_entry.constants_table 2001-12-11 18:46:43 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Sebastian Bergmann
4345f8a0b5 MFZE1 (AIX fixes) 2001-12-11 09:17:38 +00:00
Andi Gutmans
3bfee898db - More namespaces work.
- Nuke memory leak.
2001-12-10 18:57:17 +00:00
Andi Gutmans
e858d27888 - Initial support for class constants. There are still a few semantic
- issues which need to be looked into but basically it seems to work.
- Example:
<?php
	class foo
	{
		const hey = "hello";
	}

	print foo::hey;
?>
2001-11-30 16:29:47 +00:00
Andi Gutmans
d2da63f629 - Support static members. The following script works:
<?
	class foo
	{
		class bar
		{
			function init_values()
			{
				for ($i=1; $i<10; $i++) {
					foo::bar::$hello[$i] = $i*$i;
				}
			}

			function print_values()
			{
				for ($i=1; $i<10; $i++) {
					print foo::bar::$hello[$i] . "\n";
				}
			}
		}
	}

	foo::bar::init_values();
	foo::bar::print_values();

	for ($i=1; $i<10; $i++) {
		print $hello[$i]?"Shouldn't be printed\n":"";
	}
?>
2001-11-25 08:49:09 +00:00
Andi Gutmans
48e54e0c7a - RISC OS patch by Alex Waugh 2001-11-03 13:35:14 +00:00
Andi Gutmans
b87194e0c6 - Add constructor to the zend_class_entry instead of looking it up each
- time by name.
- This will allow the next patch of being able to instantiate nested
- classes such as new foo::bar::barbara();
2001-11-03 11:59:14 +00:00
Andi Gutmans
26578c386d - Initial support for nested class definitions 2001-10-29 17:19:02 +00:00
Andi Gutmans
2eabb14dc7 - Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch when
- the whole CVS tree is work in progress
2001-09-30 17:29:55 +00:00
Stanislav Malyshev
2a0a07b883 Add dlsym underscore detection, by Jani Taskinen 2001-08-26 15:25:55 +00:00
Andi Gutmans
718f323edc - Fix compile problem 2001-08-19 15:23:25 +00:00