<?/* Pass the name of the class, not a declared handler */function get_public_methods($className) {   /* Init the return array */   $returnArray = array();   /* Iterate through each method in the class */   foreach (get_class_methods($className) as$method) {       /* Get a reflection object for the class method */       $reflect = newReflectionMethod($className,$method);       /* For PRivate, use isPrivate().  For protected, use isProtected() */       /* See the Reflection API documentation for more definitions */       if($reflect->isPublic()) {           /* The method is one we're looking for, push it onto the return array */           array_push($returnArray,$method);       }   }   /* return the array to the caller */   return $returnArray;}?>新闻热点
疑难解答