SE/se-lib/xsl-functions/testFetchWfs.php // function testFetchWfs() {} * @example test_fetchWfs -> SE/se-lib/xsl-functions/test/fetchWfs.php // function test_fetchWfs() {} */ public static function _loadXslFunction($funcName, $required = true) { DBG::log("_loadXslFunction({$funcName})..."); if (function_exists($funcName)) return true; $path = APP_PATH_LIB . '/xsl-functions/' . implode('/', explode('_', $funcName)) . '.php'; DBG::log("DBG _loadXslFunction: {$path}"); if (file_exists($path)) { require_once $path; } else { $path = APP_PATH_LIB . "/xsl-functions/{$funcName}.php"; DBG::log("DBG _loadXslFunction: {$path}"); if (file_exists($path)) { require_once $path; } } if (function_exists($funcName)) { return true; } else { if ($required) { die("Cant load xsl function {$funcName}"); } return false; } } }