Re: PHP4: calling method on returned object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karl Glennon wrote:
[snip]
I expected to have the ability to get the url of a location's map with the floowing statement:

print $this->Location->GetMap()->GetUrl();
[snip]
Is there any other syntax in PHP4 to allow me to concisely call a method on a return object? eg. ($this->Location->GetMap())->GetUrl() .. which doens't work.

In short, no. That syntax was introduced in PHP5. For OO work, I would strongly recommend upgrading to PHP5 as there are many other important OO features that simply are not available in PHP4.

--
Jasper Bryant-Greene
General Manager
Album Limited

http://www.album.co.nz/     0800 4 ALBUM
jasper@xxxxxxxxxxx          021 708 334

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux