Req #68876 [Opn->Sus]: Access specifier for class

From: Date: Sat, 05 Aug 2017 04:53:36 +0000
Subject: Req #68876 [Opn->Sus]: Access specifier for class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210516@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68876&edit=1 ID: 68876 Updated by: stas@php.net Reported by: kulinchoksi at gmail dot com Summary: Access specifier for class -Status: Open +Status: Suspended Type: Feature/Change Request Package: *General Issues Operating System: any PHP Version: 5.6.4 Block user comment: N Private report: N New Comment: Thank you for your interest in PHP and for submitting a feature request. Please be aware that due to the magnitude of change this request requires, it would be necessary to discuss it on PHP Internals list (internals@lists.php.net) as an RFC. Please read the guide about creating RFCs here: https://wiki.php.net/rfc/howto If you haven't had experience with writing RFCs before, it is advised to seek guidance on the Internals list (http://php.net/mailing-lists.php) and/or solicit help from one of the experienced developers. Please to not consider this comment as a negative view on the merits of your proposal - every proposal which requires changes of certain magnitude, even the very successful and widely supported ones, must be done through the RFC process. This helps make the process predictable, transparent and accessible to all developers. Previous Comments: ------------------------------------------------------------------------ [2015-02-24 23:10:21] edgar dot r dot sandi at gmail dot com I think that you maybe is asking by: https://github.com/php/php-src/pull/947 I'm right? cross your fingers! cheers ------------------------------------------------------------------------ [2015-01-21 14:13:48] kulinchoksi at gmail dot com Description: ------------ --- From manual page: http://www.php.net/language.oop5.visibility --- In recent versions of PHP, we have introduced feature of namespaces. I was thinking of the scenario where we can specify access specifier/visibility of classes also. We may allow to access instantiation of the class inside namespace only if it's private. Although I'm not sure about allowing the objects of that class outside the namespace but I think, it should be allowed in any case. Example of encapsulating classes in namespace could be: - Different payment classes may represent different payment methods. - A payment manager class can only access the payment factory which will decide to instantiate particular type of payment class. - In application, we would access payment class via manager class only. So manager class can behave like a public interface of payment entities. Example: namespace application/payment; abstract class Payment { ... } private class TypePaypal extends Payment { ... } private class TypePaymentInAdvance extends Payment { ... } class PaymentFactory { ... } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68876&edit=1

« previous php.bugs (#210516) next »