Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66271 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90476 invoked from network); 27 Feb 2013 15:08:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2013 15:08:22 -0000 Authentication-Results: pb1.pair.com header.from=steve@mrclay.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=steve@mrclay.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mrclay.org from 50.22.11.19 cause and error) X-PHP-List-Original-Sender: steve@mrclay.org X-Host-Fingerprint: 50.22.11.19 bedford.accountservergroup.com Received: from [50.22.11.19] ([50.22.11.19:59654] helo=bedford.accountservergroup.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/70-20700-4612E215 for ; Wed, 27 Feb 2013 10:08:21 -0500 Received: from n128-227-189-85.xlate.ufl.edu ([128.227.189.85]:63243 helo=Distance-Ed-Sclay.local) by bedford.accountservergroup.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from ) id 1UAicE-000Enw-2j for internals@lists.php.net; Wed, 27 Feb 2013 09:08:18 -0600 Message-ID: <512E2161.8060000@mrclay.org> Date: Wed, 27 Feb 2013 10:08:17 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 MIME-Version: 1.0 To: PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bedford.accountservergroup.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mrclay.org Subject: Re: [PHP-DEV] I would like to write an RFC for the addition of an internal keyword From: steve@mrclay.org (Steve Clay) On 2/27/13 3:18 AM, Nikita Nefedov wrote: > I, for one, think it should be solved on the IDE side. I used a lot of Doctrine's internal > methods lately and if they would be not accessible I wouldn't be able to do a lot of things. > Of course internal methods/classes shouldn't be exposed as a part of API, but if they > exist, I would want to call them *if I know what I'm doing*. I think it would be useful if > phpdoc had an @internal tag so that IDEs could highlight places where you use internal > parts of library. Agreed, IDE/phpDoc is the place for a solution (and I do recognize that there is some need here). phpDoc already supports "@access private" for items to be left out of public documentation. An IDE could be configured to have these items appear greyed or not to appear in autocomplete lists. There's already a way to tightly control access: embrace OOP and eliminate statically accessible APIs (global vars/funcs and static props/methods) that you don't want people calling. You don't actually need them. Although closures helped too, PHP gained true information hiding in 5.0 with "private". Steve Clay -- http://www.mrclay.org/