List Info

Thread: note 78438 added to language.oop5




note 78438 added to language.oop5
user name
2007-10-11 21:53:10
You know, it would be rather nice to have something like:

namespace SomeClassContainer
{
	class MyClass1
	{
		class MyClass1ChildClass
		{
			function __construct()
			{
				print "I will print when " . __CLASS__ .
" is instanciated, but will only work if " .
parent . " is instanciated, also.n";
				print "The syntax would be something like
this:n";
				print '    $ns = SomeClassContainer;' . "n";
				print '    $myClass1 = new $ns->MyClass1();' .
"n";
				print '    $mySubClass1 = new
$myClass1->MyClass1ChildClass();' . "n";
				print "--OR--n";
				print '    $mySubClass1 = new
SomeClassContainer::MyClass1::MyClass1ChildClass();' .
"n";
			}
		}
		
		function __construct()
		{
			print "I will print when " . __CLASS__ . "
is instanciated.";
		}
	}
}
----
Server IP: 69.147.83.197
Probable Submitter: 24.159.187.86
----
Manual Page -- http:/
/www.php.net/manual/en/language.oop5.php
Edit        -- https://master
.php.net/note/edit/78438
Del: integrated  -- h
ttps://master.php.net/note/delete/78438/integrated
Del: useless     -- http
s://master.php.net/note/delete/78438/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78438/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78438/spam
Del: non-english -- 
https://master.php.net/note/delete/78438/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78438/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78438
Reject      -- https://mast
er.php.net/note/reject/78438
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )