function getmodulecountbytype($type) { $count = 0; $dependencies = geteasy()->getdependencylist(); foreach ($dependencies as $id => $item) { if ($item['dependent']['type'] == $type) { $count++; } } return $count; }
/** * @brief Setting log level * * @param [in] $level new log level * @return old log level */ function setloglevel($level) { $g_logger_loglevel =& geteasy()->getloglevel(); $old = $g_logger_loglevel; $g_logger_loglevel = intval($level); log_message(LOGGER_DEBUG, 'called function: ' . __FUNCTION__ . ' with $level=' . $g_logger_loglevel); return $old; }
function includeeasymodule($dir, $name) { return geteasy()->includemodule($dir, $name); }
function SVG($name, $tagid = '', $tagclass = '', $additional = '') { $name = geteasy()->getbaseurl() . 'images/logo'; echo '<img ' . ($tagid != '' ? 'id="' . $tagid . '"' : '') . ' ' . ($tagclass != '' ? 'class="' . $tagclass . '"' : '') . ' src="' . $name . '.svg" onerror="this.onerror=null; this.src=\'' . $name . '.png\'" ' . $additional . '/>'; }
/** * @brief Set css name */ protected function setcssname($cssname) { return geteasy()->setcssname($cssname); }
/** * @brief This function returns the baseurl's value from the config/config.ini. * If the value is not exist then the creates this. */ function getbaseurl() { return geteasy()->getbaseurl(); }
case COMPONENT_HELPER: $retval = "HELPER"; break; case COMPONENT_LIBRARY: $retval = "LIBRARY"; break; case COMPONENT_CONTROLLER: $retval = "CONTROLLER"; break; default: $retval = "UNKNOWN"; } return $retval; } } if (!defined('utils_inited')) { $g_dependency_list =& geteasy()->getdependencylist(); define('utils_inited', true); /** * @brief Get logger version * * @retval logger version */ if (!function_exists('getutilsversion')) { function getutilsversion() { return '1.0.0.4'; } } adddependency('utils', getutilsversion(), COMPONENT_HELPER, 'logger', '1.0.0.2', COMPONENT_HELPER); }