Пример #1
0
function handler_require_once($handler)
{
    $handler_file = handler_file($handler);
    if (file_exists($handler_file)) {
        require_once $handler_file;
    } else {
        return false;
    }
}
Пример #2
0
function handler_autoloader($handler)
{
    if (function_exists('autoload_handler')) {
        return autoload_handler($handler);
    }
    $handler_file = handler_file($handler);
    if (file_exists($handler_file)) {
        require_once $handler_file;
    }
}
Пример #3
0
function handler_func_exists($handler, $func)
{
    $handler_func = "{$handler}_{$func}";
    if (function_exists($handler_func)) {
        return $handler_func;
    }
    if (!empty($handler)) {
        $handler_file = handler_file($handler);
        if (file_exists($handler_file)) {
            require_once $handler_file;
        }
        if (function_exists($handler_func)) {
            return $handler_func;
        }
    }
    return false;
}