Using functions from within the same class
You can try a static call like this:
function doAnother ($str) {
return self::doSomething($str);
}
Or if you want to make it a dynamic call, you can use $this keyword, thus calling a function of a class instance:
function doAnother ($str) {
return $this->doSomething($str);
}
Try:
return $this->doSomething($str);
Have a look at this as well: http://php.net/manual/en/language.oop5.php
Try the following:
return $this->doSomething($str);