Re: Double method access (Hi everyone! :))

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

 



On 03/04/2011 09:25 PM, Paola Alvarez wrote:
Hi there!,
I have been reading this list before but this is my first post.
Reading some code from Symfony I got this: $this->getTable()->getColumns()
...when you can use this double method access?, I used before the
regular $this->getTable(), but two?. I mean I have been trying but I got an
error*

* Fatal error: Call to a member function ... on a non-object in ...

I think the problem is $this->getTable() returns non-object.

There is nothing wrong with using multiply "->" as long as return-value from previous call is an object.

Alex

--
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