Example #1
0
 public static function execute()
 {
     if (!isset($_GET['search'])) {
         $_GET['search'] = '';
     }
     if (!empty($_GET['search'])) {
         $result = ServerInfo::find($_GET['search']);
     } else {
         $result = ServerInfo::getAll();
     }
     $result['rpcStatus'] = RPC::STATUS_SUCCESS;
     echo json_encode($result);
 }