Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62132 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14193 invoked from network); 13 Aug 2012 23:16:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2012 23:16:30 -0000 Authentication-Results: pb1.pair.com header.from=naderman@naderman.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=naderman@naderman.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain naderman.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: naderman@naderman.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:58018] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/ED-00812-CCA89205 for ; Mon, 13 Aug 2012 19:16:29 -0400 Received: from [192.168.1.5] (krlh-5f71f5b0.pool.mediaWays.net [95.113.245.176]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id BF27763F0A for ; Tue, 14 Aug 2012 01:16:25 +0200 (CEST) Message-ID: <50298AC9.4070302@naderman.de> Date: Tue, 14 Aug 2012 01:16:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Decorators Revisited From: naderman@naderman.de (Nils Adermann) On 08/12/2012 08:17 PM, Anthony Ferrara wrote: > Thoughts? Yes, please. I think this would be a great simplification for all kinds of extensibility / plugin mechanisms implemented in various PHP projects. Typically these either end up with the boilerplate you described or try to come up with some kind of hack (e.g. dynamic code generation) to circumvent the problem of having to explicitly define parent classes if one wants to dynamically decorate objects multiple times while maintaing interfaces. Cheers, Nils