private static function _msg($x) { if (self::$verbose) { namespace\Console::out($x); } }
/** * @covers Zepto\Console::out() */ public function testOutAsStaticMethod() { Console::out('HAHA'); $this->expectOutputString(PHP_EOL . 'HAHA' . PHP_EOL); }
static function __static() { self::$in = new StringReader(new ConsoleInputStream(STDIN)); self::$out = new StringWriter(new ConsoleOutputStream(STDOUT)); self::$err = new StringWriter(new ConsoleOutputStream(STDERR)); }
public static function ls($fname) { $instanceName = __CLASS__; $fn = function ($fd, $key, $itm) use($instanceName) { $t = '%s%4o %8X %-12s %-12s %14d [%s]'; $a = $instanceName::translateItem($itm); $s = \sprintf($t, $a['type'], $a['perms'], $a['crc32'], $a['mtime'], $a['ctime'], $a['size'], $a['path']); Console::out($s); return false; }; self::_iterate($fname, $fn); }