note 103725 added to language.oop5.visibility

From: Date: Fri, 29 Apr 2011 21:06:16 +0000
Subject: note 103725 added to language.oop5.visibility
Groups: php.notes 
Request: Send a blank email to php-notes+get-179290@lists.php.net to get a copy of this message
In response to ryan dot m dot lange at gmail dot com's note, the child classes cannot access $this->foo because foo was declared private, if you need to access or modify foo in a child class, use the protected keyword. Alternatively, keep the foo private and make protected or public getter/setter methods. ---- Server IP: 69.147.83.197 Probable Submitter: 156.34.204.149 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.visibility.php Edit -- https://master.php.net/note/edit/103725 Del: integrated -- https://master.php.net/note/delete/103725/integrated Del: useless -- https://master.php.net/note/delete/103725/useless Del: bad code -- https://master.php.net/note/delete/103725/bad+code Del: spam -- https://master.php.net/note/delete/103725/spam Del: non-english -- https://master.php.net/note/delete/103725/non-english Del: in docs -- https://master.php.net/note/delete/103725/in+docs Del: other reasons-- https://master.php.net/note/delete/103725 Reject -- https://master.php.net/note/reject/103725 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179290) next »