Still feasible though: PRs to https://github.com/Roave/Dont/tree/master/src/Dont welcome
On Sun, 10 Mar 2019, 21:56 Rowan Collins, <rowan.coll...@gmail.com> wrote: > On 10/03/2019 20:19, Dan Ackroyd wrote: > > trait LockedClass > > { > > public function __set($name, $value) > > { > > throw new \Exception("Property [$name] doesn't exist for class [" . > > get_class($this) . "] so can't set it"); > > } > > public function __get($name) > > { > > throw new \Exception("Property [$name] doesn't exist for class [" . > > get_class($this) . "] so can't get it"); > > } > > } > > > Incidentally, this isn't quite equivalent to the current RFC, because it > will also intercept access to private or protected properties from out > of scope. It doesn't make much difference other than making the error > messages less helpful, but it's an example of how a nice userland > implementation isn't quite as trivial as it first looks. > > Regards, > > -- > Rowan Collins > [IMSoP] > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >