Answer the question
In order to leave comments, you need to log in
How to change class?
the system I am working with returns me an object of the Content type,
this class is hardcoded in logic and there is no way to change it through the configuration parameters,
I need to add a couple of methods of the Content-> getChildren () type to it,
which will make an additional request to the database
I did
class myContent extends Content
{
public function __construct( $obj )
{
foreach ($obj as $key => $value)
{
$this->$key = $value;
}
}
public function getChildren()
{ . . .}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question