From c3cb681d40cb699163393527e2ea52368a5aec3e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 23 Jan 2008 10:12:27 +0000 Subject: [PATCH] Added function to check the availability of a class. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8558 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index b043a06f9..76702935f 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -109,6 +109,17 @@ function __autoload($class_name) { } +/*! \brief Checks if a class is available. + * @param name String The class name. + * @return boolean True if class is available, else false. + */ +function class_available($name) +{ + global $class_mapping; + return(isset($class_mapping[$name])); +} + + /* Check if plugin is avaliable */ function plugin_available($plugin) { -- 2.30.2