Пример #1
0
 /**
  * Get a single server from a "groups" stats, group being a named listen, frontend or backend
  *
  * @param Application $app       The silex app.
  * @param $name       The group name
  *
  * @return string
  */
 public function getGroupServer(Application $app, $name, $server)
 {
     $socket = new Socket();
     $stats = $socket->getStats();
     return $app->json($stats[$name][$server]);
 }
Пример #2
0
 /**
  * Get all the stats.
  *
  * @return string
  */
 public function getStats()
 {
     $socket = new Socket();
     return $socket->getStats();
 }