note 112648 added to function.get-class-methods

From: Date: Tue, 09 Jul 2013 09:39:27 +0000
Subject: note 112648 added to function.get-class-methods
Groups: php.notes 
Request: Send a blank email to php-notes+get-195540@lists.php.net to get a copy of this message
<?php function get_class_methods_that_are_not_inherited_from_any_other_class($class) { $classReflection = new ReflectionClass($class); $classMethods = $classReflection->getMethods(); $classMethodNames = []; foreach ($classMethods as $index => $method) { if ($method->getDeclaringClass()->getName() !== $class) { unset($classMethods[$index]); } else { $classMethodNames[] = $method->getName(); } } return $classMethodNames; } ---- Server IP: 46.17.113.3 Probable Submitter: 79.185.93.217 ---- Manual Page -- http://php.net/manual/en/function.get-class-methods.php Edit -- https://master.php.net/note/edit/112648 Del: integrated -- https://master.php.net/note/delete/112648/integrated Del: useless -- https://master.php.net/note/delete/112648/useless Del: bad code -- https://master.php.net/note/delete/112648/bad+code Del: spam -- https://master.php.net/note/delete/112648/spam Del: non-english -- https://master.php.net/note/delete/112648/non-english Del: in docs -- https://master.php.net/note/delete/112648/in+docs Del: other reasons-- https://master.php.net/note/delete/112648 Reject -- https://master.php.net/note/reject/112648 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195540) next »