class DBmodel{ private $name; publice function delete($name){ $this->name = $name; } }
Does $this inside represent the entire class DBmodel, or the class method delete?
autoload2021-10-11 09:34:18
$this represents an object, and the environment where $this is located is inside the method inside the class, so the $this object is accessed inside the class
A _ Q _i_2021-10-10 19:56:16
Does $this in
//如果里面有构造方法: function __construct(){ $this->name = $name; }
represent the constructor method itself?