I'm using an email library class from the framework Nette .
At some point, instead of calling the setSubject
method - which is the correct method, I called addSubject
, since I had forgotten the method name.
So the following error was returned to me:
Method addSubject does not exist. Did you mean setSubject?
That is, he suggested that the correct class method name be setSubject
.
How can I do this in one (or several) of my classes in PHP?
Example:
class Myclass
{
public function callMethod()
{
}
}
(new MyClass)->callMyMethod(); // Lança a exceção sugerindo o nome correto