Reply to Re: Accessing Class Method

Your name:

Reply:


Posted by NoDude on 09/17/07 13:16

They can't interact, because they'll never be able to see each other.
If you want to accomplish an interaction using your current setup,
you'll have to write methods in the main_class class, which will
delegate information from one object to another.

On Sep 17, 3:13 pm, RageARC <rage...@gmail.com> wrote:
> I have the following code:
>
> index.php:
> class main_class {
>
> public $database = new DAL;
> public $html = new HTML;
>
> }
>
> dal.php:
> class DAL {
>
> function method() {
> # Code
>
> }
> }
>
> class HTML {
>
> function method() {
> # Code
> # HOW TO CALL DAL'S METHOD?
> # Code
>
> }
> }
>
> As you see, DAL and HTML are inside two variables of two classes, but
> how can they interact with each other?

[Back to original 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

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