PHP object cannot find method

Posted by Daniel Hertz on Stack Overflow See other posts from Stack Overflow or by Daniel Hertz
Published on 2010-04-16T18:18:55Z Indexed on 2010/04/16 18:23 UTC
Read the original article Hit count: 149

Filed under:
|
|

Hello,

So I have a very simple class that has a method called getThumbUrl() but when I try calling this method on an instance I get

Notice: Undefined property: FlickrImage::$getFullUrl

But it is clearly there. Here is the code of the function:

public function getThumbUrl()
{
    return "http://farm".$this->_farm.".static.flickr.com/".$this->_server."/".$this->_id."_".$this->_secret."_t.jpg";
}

And here is where it fails:

foreach($photos as $photo) {
    echo "<img src='$photo->getFullUrl()' />";
}

Any ideas? Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about php5