D
D
deepin2019-07-28 11:33:35
PHP
deepin, 2019-07-28 11:33:35

Is it possible to pass an instance like this?

public function one()
{
    $Obj = new Model();
    $this->two($Obj);
}

public function two($Obj)
{
    $Obj->method();
}

why I ask: everything works, but the storm highlights the method () that it was not found

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2019-07-28
@deepin

two(Model $Obj)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question