YF
Size: a a a
YF
АК
АК
АК
А
АК
M
JC
А
А
M
TC
D
TC
VH
abstract class BaseFoo
{
/**
* @var BarModel
*/
protected $bar;
/**
* @var BazModel
*/
protected $baz;
/**
* BaseFoo constructor.
*
* @param BarModel $bar
* @param BazModel $baz
*/
public function __construct(BarModel $bar, BazModel $baz)
{
$this->bar = $bar;
$this->baz = $baz;
}
/**
* @return Application|Model|mixed
*/
protected function barQuery()
{
return clone $this->bar;
}
/**
* @return Application|Model|mixed
*/
protected function bazQuery()
{
return clone $this->baz;
}
}
final class FooChild extends BaseFoo
{
/**
* @return mixed
*/
protected function something()
{
return $this->barQuery()
->where(...)->get();
}
}
А
VH