跳至
class testMet
{
public function __construct(\Closure $method)
{
$bind = \Closure::bind($method, $this);
$bind();
}
public function name()
{
var_dump('Oh, My God');
}
}
class papa
{
public function __construct()
{
$that = $this;
(new testMet(function () use($that)
{
// 注意哦,这里的 $this 就不再是papa类的对象咯,而是testMet构造出来的哦~
$that->_tn('Levi');
$this->name();
}));
}
protected function _tn($name)
{
var_dump('I am '.$name);
}
}
class son extends papa
{
protected function _tn($name)
{
var_dump('Her is '.$name);
parent::_tn('Lucy');
}
}
new son('Levi');
稿定AI
拥有线稿上色优化、图片重绘、人物姿势检测、涂鸦完善等功能
下载