[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 4 5 /** 6 * \ingroup Core 7 * 8 * <b>Very</b> modest attempt to recreate some kind of Reflection API 9 * "a la" Java. 10 */ 11 class Reflection 12 { 13 14 /** 15 * Constructor. Does nothing. 16 */ 17 function Reflection() 18 { 19 20 } 21 22 /** 23 * Returns true if the class has a method called $methodName 24 * 25 * @param class An object of the class we want to check 26 * @param methodName Name of the method we want to check 27 * @return Returns true if method exists otherwise, false 28 */ 29 function methodExists( &$class, $methodName ) 30 { 31 return method_exists( $class, $methodName ); 32 } 33 34 /** 35 * Returns all the methods available in the class. It returns both the methods from the 36 * class itself <b>as well as</b> all 37 * 38 * @param class The class from which we would like to check the methods 39 * @return An array containing all the methods available. 40 */ 41 function getClassMethods( &$class ) 42 { 43 return get_class_methods( $class ); 44 } 45 } 46 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |