Last active
June 24, 2021 23:22
-
-
Save medeirosinacio/3fe4f8e8217a718e89ad5082c46bc744 to your computer and use it in GitHub Desktop.
Checks if the class has been defined and Checks if the class method exists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Checks if the class has been defined and Checks if the class method exists | |
* @param $class_object | |
* @param $method_name | |
* @return bool | |
*/ | |
function class_method_exists($class_object, $method_name) | |
{ | |
return class_exists($class_object) && method_exists($class_object, $method_name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment