Any time I want to use an instance variable, I need to use the pseudovariable $this, am I correct? And if those are objects with methods, I'm still having to use them. So when I have an example like so:
class myClass{
private $thingOne;
private $thingTwo;
public function __construct($thingOne,$thingTwo){
$this->thingOne = $thingOne;
$this->thingTwo = $thingTwo;
}
}
And then I start adding methods to myClass
I have to start typing things like:
$this->thingOne->doSomething($this->thingTwo->doSomethingElse());
But I would much rather type:
$thingOne->doSomething($thingTwo->doSomethingElse());
I just find writing this-> all the time to be annoying. Can't it just be assumed that I'm using the instance variables that I have given it? My code ends up having this this this this this this this everywhere.
Could I rename it to something shorter? $t or something?