コード例 #1
0
 /**
  * Main
  *
  * @param   string[] args
  * @return  int
  */
 public static function main(array $args)
 {
     Console::writeLinef('XP %s { PHP %s & ZE %s } @ %s', xp::version(), phpversion(), zend_version(), php_uname());
     Console::writeLine('Copyright (c) 2001-2013 the XP group');
     foreach (ClassLoader::getLoaders() as $delegate) {
         Console::writeLine($delegate->toString());
     }
     return 1;
 }
コード例 #2
0
ファイル: Version.class.php プロジェクト: xp-framework/core
 /**
  * Main
  *
  * @param   string[] $args
  * @return  int
  */
 public static function main(array $args)
 {
     if (empty($args)) {
         Console::writeLinef('XP %s { PHP %s & ZE %s } @ %s', \xp::version(), phpversion(), zend_version(), php_uname());
         Console::writeLine('Copyright (c) 2001-2016 the XP group');
         foreach (\lang\ClassLoader::getLoaders() as $delegate) {
             Console::writeLine($delegate->toString());
         }
         return 1;
     } else {
         foreach ($args as $arg) {
             $method = $arg . 'Version';
             if (is_callable(['self', $method])) {
                 Console::writeLine(self::$method());
             } else {
                 Console::$err->writeLinef('Unkown version argument `%s\'', $arg);
             }
         }
         return 0;
     }
 }
コード例 #3
0
ファイル: XpTest.class.php プロジェクト: Gamepay/xp-framework
 public function version()
 {
     $this->assertEquals(3, sscanf(xp::version(), '%d.%d.%d', $series, $major, $minor));
 }