Edit report at https://bugs.php.net/bug.php?id=55331&edit=1
ID: 55331 Comment by: edp at ultradrive dot com Reported by: gordon dot mcvey at ntlworld dot com Summary: Package/Namespace visibility control keyword Status: Open Type: Feature/Change Request Package: Class/Object related Operating System: any PHP Version: 5.4.0alpha2 Block user comment: N Private report: N New Comment: As in Java, the package access level should be implemented both for entire classes and for individual members in a class. Previous Comments: ------------------------------------------------------------------------ [2012-04-05 09:57:06] info at strictcoding dot co dot uk This would be awesome. It's currently very difficult to protect a domain model without this feature. ------------------------------------------------------------------------ [2011-07-31 21:42:33] gordon dot mcvey at ntlworld dot com Description: ------------ With the addition of namespaces, a new level of member protection for classes similar to Java's package visibility would be a useful addition. Currently we have the following protection levels: * Private: Member is visible only within the class that defines it * Protected: Member is visible within the class that defines it and any subclasses that inherit from it * Public: Member is visible anywhere. I would suggest that an additional "package" or "namespace" protection level keyword would be a useful addition. Members marked as package or namespace would be visible to any other class defined in the same namespace as the defining class. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55331&edit=1