Re: Re: Friend class/function

From: Date: Mon, 02 Nov 2015 09:45:59 +0000
Subject: Re: Re: Friend class/function
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-89033@lists.php.net to get a copy of this message
On 2 November 2015 at 09:25, Rowan Collins <rowan.collins@gmail.com> wrote: > Andrea Faulds wrote on 01/11/2015 19:35: > >> I recently wished PHP had this feature when trying to implement the >> Khronos Group Typed Arrays specification in PHP, which requires sharing >> certain data between unrelated (inheritance-wise) classes. I ended up >> having to expose a public method to get the data, but named in a way that >> was likely to deter use. >> > > Would "package" (namespace-based) visibility have solved the problem in > this case? That's something I've often wanted - "this is public within this > Lib, but should never be used outside it". > > This was worked on for 7, but had a fundamental problem blocking it - See Guilherme's recent runtime execution scope mail.

« previous php.internals (#89033) next »