Answer the question
In order to leave comments, you need to log in
Multiple methods on same PHP object?
How to describe a class so that it would be possible to apply several methods to one object in PHP?
Like this:
$obj->foo()->bar();
Answer the question
In order to leave comments, you need to log in
the method must return a pointer to the instance: at the end of the method must be return $this;
https://en.wikipedia.org/wiki/Method_chaining#PHP
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question