Ok so I've been reading a million books to fully understand how
$this-> works and I think I've got it. I'll try to explain, I hope I get it right, for the sake of brevity, we have a simple class here:
PHP Code:
class myClass {
public $variable1;
public function method() {
}
}// END CLASS
When the main script instantiates this class and creates the object:
$myClass = new myClass();
Well,
$myClass-> and
$this-> are basically the same thing. You can access methods/properties the same way.
The only difference is that if a property/method is set to private, then the outside object will have no direct access, but the inside object "
$this->" will have access....
And that's pretty much it? Did I get it right?
Someone? Anyone??
Are there any other differences between the two that I missed?