Example #1
0
function test($ns, $prompt, $param, $default = null, $validator = null, $sanitizer = null)
{
    static $cx = null;
    if (is_null($cx)) {
        $cx = new CX();
    }
    echo "<dt>Get {$param} with {$prompt}: </dt><dd>";
    try {
        print_r($cx->ns($ns)->getValue($param, $default, $validator, $sanitizer));
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    echo '</dd>';
}