Esempio n. 1
0
 private static function _msg($x)
 {
     if (self::$verbose) {
         namespace\Console::out($x);
     }
 }
Esempio n. 2
0
 /**
  * @covers Zepto\Console::out()
  */
 public function testOutAsStaticMethod()
 {
     Console::out('HAHA');
     $this->expectOutputString(PHP_EOL . 'HAHA' . PHP_EOL);
 }
Esempio n. 3
0
 static function __static()
 {
     self::$in = new StringReader(new ConsoleInputStream(STDIN));
     self::$out = new StringWriter(new ConsoleOutputStream(STDOUT));
     self::$err = new StringWriter(new ConsoleOutputStream(STDERR));
 }
Esempio n. 4
0
 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);
 }