4 ms·
That's not what he's referring to. He's specifically referring to a read-only that only affects external classes. So, the object itself could write to that fi
by jasonlotito 14y ago
That's not what he's referring to. He's specifically referring to a read-only that only affects external classes. So, the object itself could write to that field, but nothing else could.
- shakesbeard 14y agoYou can set the visibility of both the properties and the getters/setters. class Foo { private $fuzz; protected $Bar { get { return $this->fuzz; } private set { $this->fuzz = $value; } } }
- jasonlotito 14y agoYes. I understand that. My point was just that he specifically wanted a read-only.