Ejemplo n.º 1
0
 function getmodulecountbytype($type)
 {
     $count = 0;
     $dependencies = geteasy()->getdependencylist();
     foreach ($dependencies as $id => $item) {
         if ($item['dependent']['type'] == $type) {
             $count++;
         }
     }
     return $count;
 }
Ejemplo n.º 2
0
 /**
  *  @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;
 }
Ejemplo n.º 3
0
 function includeeasymodule($dir, $name)
 {
     return geteasy()->includemodule($dir, $name);
 }
Ejemplo n.º 4
0
 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 . '/>';
 }
Ejemplo n.º 5
0
 /**
  * @brief Set css name
  */
 protected function setcssname($cssname)
 {
     return geteasy()->setcssname($cssname);
 }
Ejemplo n.º 6
0
 /**
  * @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();
 }
Ejemplo n.º 7
0
            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);
}