Re: Double method access (Hi everyone! :))
| From: | alex | Date: | Fri, 04 Mar 2011 19:29:36 +0000 |
| Subject: | Re: Double method access (Hi everyone! :)) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311672@lists.php.net to get a copy of this message | ||
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