class DBmodel{ private $name; publice function delete($name){ $this->name = $name; } }
Does $this inside represent the entire class DBmodel, or the class method delete?
$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
Does $this in
//如果里面有构造方法: function __construct(){ $this->name = $name; }
represent the constructor method itself?
$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
Does $this in
represent the constructor method itself?