From 2469125a60047e1c0a02994b787792827bb1b900 Mon Sep 17 00:00:00 2001 From: everyx Date: Sun, 16 Oct 2016 15:24:30 +0800 Subject: [PATCH] complete --- Controller/OperatorStatusController.php | 56 +++++++++++++++++++++++++ Plugin.php | 51 ++++++++++++++++++++++ composer.json | 15 +++++++ routing.yml | 4 ++ 4 files changed, 126 insertions(+) create mode 100644 Controller/OperatorStatusController.php create mode 100644 Plugin.php create mode 100644 composer.json create mode 100644 routing.yml diff --git a/Controller/OperatorStatusController.php b/Controller/OperatorStatusController.php new file mode 100644 index 0000000..de7a4b3 --- /dev/null +++ b/Controller/OperatorStatusController.php @@ -0,0 +1,56 @@ +query->get('code', false); + $online_operators = get_online_operators(); + foreach ($online_operators as $item) { + if ($item['code'] == $opcode) { + $is_online = "true"; + } + } + return new Response($is_online); + } +} diff --git a/Plugin.php b/Plugin.php new file mode 100644 index 0000000..69c2f2d --- /dev/null +++ b/Plugin.php @@ -0,0 +1,51 @@ +