Re: [PHP-DEV] [Pre-RFC] Support for decorator patterns

2020-02-14 Thread Rowan Tommins
On Fri, 14 Feb 2020 at 11:09, Rowan Tommins wrote: > > That would also cover the fluent interface case: > > after delegate setFoo { > $this->delegated = $return; > return $this; > } > I just realised that this could be easily extended to share an implementation across multiple methods,

Re: [PHP-DEV] [Pre-RFC] Support for decorator patterns

2020-02-14 Thread Rowan Tommins
On Tue, 11 Feb 2020 at 10:14, Nikita Popov wrote: > I'd like to get some feedback on the idea implemented in > https://github.com/php/php-src/pull/5168. It provides an easy way to > implement decorates, by taking care of forwarding any methods you do not > want to override in a type-safe way. See