Beispiel #1
0
 function get($key = "*")
 {
     $cfg = Config::get($key);
     if (is_array($cfg)) {
         foreach ($cfg as $k => $v) {
             if (is_array($v)) {
                 Console::writeLn(__astr("    \\b{%s} \\c{ltgray :} Array("), $k);
                 foreach ($v as $vk => $vv) {
                     if ($this->isPassword($vk)) {
                         $vv = __astr("\\c{gray *****}");
                     }
                     Console::writeLn(__astr("        \\b{%s} \\c{ltgray =>} %s"), $vk, __printable($vv));
                 }
                 Console::writeLn(__astr("    )"));
             } else {
                 if ($this->isPassword($k)) {
                     $v = __astr("\\c{gray *****}");
                 }
                 Console::writeLn(__astr("    \\b{%s} \\c{ltgray :} %s"), $k, __printable($v));
             }
         }
     } else {
         if (self::isPassword($key)) {
             $cfg = __astr("\\c{gray *****}");
         }
         Console::writeLn(__astr("    \\b{%-40s} \\c{ltgray :} %s"), $key, $cfg);
     }
 }
Beispiel #2
0
 function __construct($msg, $filename = null)
 {
     parent::__construct(sprintf("%s (%s)", $msg, __printable($filename)));
 }
Beispiel #3
0
 protected function assertFalse($test)
 {
     if ($test != false) {
         throw new LunitAssertionFailure(sprintf("assertFalse(): %s", __printable($test)));
     }
 }