You are here: Re: Class in class? « PHP Programming Language « IT news, forums, messages
Re: Class in class?

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация