Answer the question
In order to leave comments, you need to log in
How to lock the called methods of another class?
Hello developers! I have a test question. Covering for the first time. Below is an example:
class Book
{
public function bookFunction()
{
$page = new Page();
$page->validate($params);
}
}
class Page
{
public function validate($params)
{
$model = new Model();
$model->getParams($params)
}
}
class Model
{
public function getParams($params)
{
//DB::query...
}
}
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