note 100660 added to reflectionclass.hasmethod

From: Date: Thu, 28 Oct 2010 16:47:14 +0000
Subject: note 100660 added to reflectionclass.hasmethod
Groups: php.notes 
Request: Send a blank email to php-notes+get-173570@lists.php.net to get a copy of this message
Parent methods (regardless of visibility) are also available to a ReflectionObject. E.g., class ParentObject { public function parentPublic( ) { } private function parentPrivate( ) { } } class ChildObject extends ParentObject { } $Instance = new ChildObject(); $Reflector = new ReflectionObject($Instance); var_dump($Reflector->hasMethod('parentPublic')); // true var_dump($Reflector->hasMethod('parentPrivate')); // true ---- Server IP: 208.69.120.55 Probable Submitter: 12.151.187.1 ---- Manual Page -- http://www.php.net/manual/en/reflectionclass.hasmethod.php Edit -- https://master.php.net/note/edit/100660 Del: integrated -- https://master.php.net/note/delete/100660/integrated Del: useless -- https://master.php.net/note/delete/100660/useless Del: bad code -- https://master.php.net/note/delete/100660/bad+code Del: spam -- https://master.php.net/note/delete/100660/spam Del: non-english -- https://master.php.net/note/delete/100660/non-english Del: in docs -- https://master.php.net/note/delete/100660/in+docs Del: other reasons-- https://master.php.net/note/delete/100660 Reject -- https://master.php.net/note/reject/100660 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173570) next »