note 118738 added to language.oop5.visibility

From: Date: Thu, 28 Jan 2016 18:18:54 +0000
Subject: note 118738 added to language.oop5.visibility
Groups: php.notes 
Request: Send a blank email to php-notes+get-204791@lists.php.net to get a copy of this message
I want to merge notes from different comments about visibility of class members from parent class / sibling class point of view because visibility rules are similar. Here are main points: 1. Methods declared in parent class can access some child class members. 2. Class can access some sibling class members using methods declared in common parent. NB: only inherited not-overridden parent method could be used, if you override it in current class you have to call parent method statically to get access to sibling members. You can see list of members that could be accessed via these methods below: - inherited protected / private property – OK; - inherited protected / private method without overriding – OK; - inherited protected method with overriding – OK; - inherited private method with overriding – FAIL, original parent method will be called; - own protected property / method – OK; - own private property / method – FAIL, critical error. ---- Server IP: 72.52.91.14 Probable Submitter: 178.121.225.241 ---- Manual Page -- http://php.net/manual/en/language.oop5.visibility.php Edit -- https://master.php.net/note/edit/118738 Del: integrated -- https://master.php.net/note/delete/118738/integrated Del: useless -- https://master.php.net/note/delete/118738/useless Del: bad code -- https://master.php.net/note/delete/118738/bad+code Del: spam -- https://master.php.net/note/delete/118738/spam Del: non-english -- https://master.php.net/note/delete/118738/non-english Del: in docs -- https://master.php.net/note/delete/118738/in+docs Del: other reasons-- https://master.php.net/note/delete/118738 Reject -- https://master.php.net/note/reject/118738 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204791) next »