| 13 |
* $Id$ |
* $Id$ |
| 14 |
* |
* |
| 15 |
* $Log$ |
* $Log$ |
| 16 |
|
* Revision 1.8 2004/07/21 12:56:19 joko |
| 17 |
|
* php5 compatibility |
| 18 |
|
* |
| 19 |
* Revision 1.7 2003/06/25 23:41:14 joko |
* Revision 1.7 2003/06/25 23:41:14 joko |
| 20 |
* now using "global $Dumper_mode" |
* now using "global $Dumper_mode" |
| 21 |
* |
* |
| 432 |
|
|
| 433 |
// from: http://www.php.net/manual/en/function.method-exists.php |
// from: http://www.php.net/manual/en/function.method-exists.php |
| 434 |
function class_has_method($className, $methodName) { |
function class_has_method($className, $methodName) { |
| 435 |
$bool_exists = (in_array(strtolower($methodName), get_class_methods($className))); |
|
| 436 |
|
// new as of 2004-07-21: php5 compatibility |
| 437 |
|
// taken from http://php.net/manual/en/function.version-compare.php |
| 438 |
|
if (version_compare(phpversion(), "5.0.0", "<")) { |
| 439 |
|
$methodName = strtolower($methodName); |
| 440 |
|
} |
| 441 |
|
|
| 442 |
|
$bool_exists = (in_array($methodName, get_class_methods($className))); |
| 443 |
return $bool_exists; |
return $bool_exists; |
| 444 |
} |
} |
| 445 |
|
|