Example #1
0
File: Api.php Project: rgwybb/tars
 public function versionsGreater($product, $name, $version)
 {
     $pkg = new Pkg();
     $versionList = $pkg->getVersionList($product, $name);
     if (empty($versionList)) {
         $versionList = array();
     }
     $list = array();
     foreach ($versionList as $row) {
         if (version_compare($row['version'], $version) > 0) {
             $list[] = array('version' => $row['version'], 'remark' => $row['remark']);
         }
     }
     usort($list, function ($a, $b) {
         return version_compare($b['version'], $a['version']);
     });
     Flight::json($list);
 }