| Posted by Katipo on 10/26/05 00:56 
"Tadeusz S." <tadeusz@toznika.jca.iserwer.pl> wrote in message news:435e5f80$1@news.home.net.pl...
 Hello
 
 In Pascal, I use constructions like that
 
 var SomeVar = object
 SomeVar2 = object
 end;
 end;
 
 etc., so I could put my object into another
 object. Is this possible in PHP?
 Some like:
 
 class NameOfClass
 {
 class AnotherClass
 {
 }
 }
 ?
 
 
 Are you talking about inheritance? If so try this:
 
 class AnotherClass
 {
 }
 
 
 class NameOfClass extends AnotherClass {
 
 }
 
 The properties and methods of AnotherClass, provided they are not declared
 as private (PHP 5 and later), are now accessable as though they were
 declared in NameOfClass
 [Back to original message] |