芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/invoicer.pulsehost.co.uk/vendor/predis/predis/src/Command/Redis/CLIENT.php
getArguments(), CASE_UPPER); switch (strtoupper($args[0])) { case 'LIST': return $this->parseClientList($data); case 'KILL': case 'GETNAME': case 'SETNAME': default: return $data; } // @codeCoverageIgnore } /** * Parses the response to CLIENT LIST and returns a structured list. * * @param string $data Response buffer. * * @return array */ protected function parseClientList($data) { $clients = []; foreach (explode("\n", $data, -1) as $clientData) { $client = []; foreach (explode(' ', $clientData) as $kv) { @[$k, $v] = explode('=', $kv); $client[$k] = $v; } $clients[] = $client; } return $clients; } }