Browse Source

删除内嵌的phpredisadmin

gwang 4 years ago
parent
commit
8b7dc20a12
100 changed files with 0 additions and 8070 deletions
  1. 0 12
      Gameserver/Public/phpRedisAdmin/Dockerfile
  2. 0 58
      Gameserver/Public/phpRedisAdmin/README.markdown
  3. 0 20
      Gameserver/Public/phpRedisAdmin/composer.json
  4. 0 69
      Gameserver/Public/phpRedisAdmin/composer.lock
  5. 0 60
      Gameserver/Public/phpRedisAdmin/css/common.css
  6. 0 55
      Gameserver/Public/phpRedisAdmin/css/frame.css
  7. 0 142
      Gameserver/Public/phpRedisAdmin/css/index.css
  8. 0 63
      Gameserver/Public/phpRedisAdmin/delete.php
  9. 0 194
      Gameserver/Public/phpRedisAdmin/edit.php
  10. 0 180
      Gameserver/Public/phpRedisAdmin/export.php
  11. 0 13
      Gameserver/Public/phpRedisAdmin/flush.php
  12. BIN
      Gameserver/Public/phpRedisAdmin/images/add.png
  13. BIN
      Gameserver/Public/phpRedisAdmin/images/delete.png
  14. BIN
      Gameserver/Public/phpRedisAdmin/images/edit.png
  15. BIN
      Gameserver/Public/phpRedisAdmin/images/export.png
  16. BIN
      Gameserver/Public/phpRedisAdmin/images/favicon.png
  17. BIN
      Gameserver/Public/phpRedisAdmin/images/flush.png
  18. BIN
      Gameserver/Public/phpRedisAdmin/images/folder-open.png
  19. BIN
      Gameserver/Public/phpRedisAdmin/images/import.png
  20. BIN
      Gameserver/Public/phpRedisAdmin/images/info.png
  21. BIN
      Gameserver/Public/phpRedisAdmin/images/logout.png
  22. BIN
      Gameserver/Public/phpRedisAdmin/images/reset.png
  23. BIN
      Gameserver/Public/phpRedisAdmin/images/save.png
  24. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-folder-collapsed.gif
  25. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-folder-expanded.gif
  26. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-lastnode-collapsed.gif
  27. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-lastnode-expanded.gif
  28. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-lastnode.gif
  29. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-node.gif
  30. BIN
      Gameserver/Public/phpRedisAdmin/images/tree-vline.gif
  31. 0 117
      Gameserver/Public/phpRedisAdmin/import.php
  32. 0 136
      Gameserver/Public/phpRedisAdmin/includes/common.inc.php
  33. 0 46
      Gameserver/Public/phpRedisAdmin/includes/config.environment.inc.php
  34. 0 28
      Gameserver/Public/phpRedisAdmin/includes/config.inc.php
  35. 0 82
      Gameserver/Public/phpRedisAdmin/includes/config.sample.inc.php
  36. 0 2
      Gameserver/Public/phpRedisAdmin/includes/footer.inc.php
  37. 0 103
      Gameserver/Public/phpRedisAdmin/includes/functions.inc.php
  38. 0 44
      Gameserver/Public/phpRedisAdmin/includes/header.inc.php
  39. 0 63
      Gameserver/Public/phpRedisAdmin/includes/login.inc.php
  40. 0 22
      Gameserver/Public/phpRedisAdmin/includes/page.inc.php
  41. 0 240
      Gameserver/Public/phpRedisAdmin/index.php
  42. 0 60
      Gameserver/Public/phpRedisAdmin/info.php
  43. 0 29
      Gameserver/Public/phpRedisAdmin/js/frame.js
  44. 0 172
      Gameserver/Public/phpRedisAdmin/js/index.js
  45. 0 114
      Gameserver/Public/phpRedisAdmin/js/jquery-cookie.js
  46. 0 1
      Gameserver/Public/phpRedisAdmin/js/jquery.js
  47. 0 40
      Gameserver/Public/phpRedisAdmin/logout.php
  48. 0 103
      Gameserver/Public/phpRedisAdmin/overview.php
  49. 0 17
      Gameserver/Public/phpRedisAdmin/predis/.editorconfig
  50. 0 10
      Gameserver/Public/phpRedisAdmin/predis/.gitattributes
  51. 0 9
      Gameserver/Public/phpRedisAdmin/predis/.gitignore
  52. 0 34
      Gameserver/Public/phpRedisAdmin/predis/.php_cs
  53. 0 23
      Gameserver/Public/phpRedisAdmin/predis/.travis.yml
  54. 0 985
      Gameserver/Public/phpRedisAdmin/predis/CHANGELOG.md
  55. 0 44
      Gameserver/Public/phpRedisAdmin/predis/CONTRIBUTING.md
  56. 0 177
      Gameserver/Public/phpRedisAdmin/predis/FAQ.md
  57. 0 22
      Gameserver/Public/phpRedisAdmin/predis/LICENSE
  58. 0 492
      Gameserver/Public/phpRedisAdmin/predis/README.md
  59. 0 1
      Gameserver/Public/phpRedisAdmin/predis/VERSION
  60. 0 14
      Gameserver/Public/phpRedisAdmin/predis/autoload.php
  61. 0 31
      Gameserver/Public/phpRedisAdmin/predis/composer.json
  62. 0 117
      Gameserver/Public/phpRedisAdmin/predis/examples/custom_cluster_distributor.php
  63. 0 92
      Gameserver/Public/phpRedisAdmin/predis/examples/debuggable_connection.php
  64. 0 79
      Gameserver/Public/phpRedisAdmin/predis/examples/dispatcher_loop.php
  65. 0 57
      Gameserver/Public/phpRedisAdmin/predis/examples/executing_redis_commands.php
  66. 0 36
      Gameserver/Public/phpRedisAdmin/predis/examples/key_prefixing.php
  67. 0 71
      Gameserver/Public/phpRedisAdmin/predis/examples/lua_scripting_abstraction.php
  68. 0 44
      Gameserver/Public/phpRedisAdmin/predis/examples/monitor_consumer.php
  69. 0 45
      Gameserver/Public/phpRedisAdmin/predis/examples/pipelining_commands.php
  70. 0 59
      Gameserver/Public/phpRedisAdmin/predis/examples/pubsub_consumer.php
  71. 0 99
      Gameserver/Public/phpRedisAdmin/predis/examples/redis_collections_iterators.php
  72. 0 85
      Gameserver/Public/phpRedisAdmin/predis/examples/replication_complex.php
  73. 0 58
      Gameserver/Public/phpRedisAdmin/predis/examples/replication_sentinel.php
  74. 0 52
      Gameserver/Public/phpRedisAdmin/predis/examples/replication_simple.php
  75. 0 52
      Gameserver/Public/phpRedisAdmin/predis/examples/session_handler.php
  76. 0 44
      Gameserver/Public/phpRedisAdmin/predis/examples/shared.php
  77. 0 52
      Gameserver/Public/phpRedisAdmin/predis/examples/transaction_using_cas.php
  78. 0 36
      Gameserver/Public/phpRedisAdmin/predis/package.ini
  79. 0 50
      Gameserver/Public/phpRedisAdmin/predis/phpunit.xml.dist
  80. 0 54
      Gameserver/Public/phpRedisAdmin/predis/phpunit.xml.travisci
  81. 0 62
      Gameserver/Public/phpRedisAdmin/predis/src/Autoloader.php
  82. 0 519
      Gameserver/Public/phpRedisAdmin/predis/src/Client.php
  83. 0 198
      Gameserver/Public/phpRedisAdmin/predis/src/ClientContextInterface.php
  84. 0 21
      Gameserver/Public/phpRedisAdmin/predis/src/ClientException.php
  85. 0 239
      Gameserver/Public/phpRedisAdmin/predis/src/ClientInterface.php
  86. 0 469
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/ClusterStrategy.php
  87. 0 82
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/DistributorInterface.php
  88. 0 21
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/EmptyRingException.php
  89. 0 270
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/HashRing.php
  90. 0 71
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/KetamaRing.php
  91. 0 72
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Hash/CRC16.php
  92. 0 30
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Hash/HashGeneratorInterface.php
  93. 0 79
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/PredisStrategy.php
  94. 0 58
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/RedisStrategy.php
  95. 0 53
      Gameserver/Public/phpRedisAdmin/predis/src/Cluster/StrategyInterface.php
  96. 0 191
      Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/CursorBasedIterator.php
  97. 0 60
      Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/HashKey.php
  98. 0 43
      Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/Keyspace.php
  99. 0 176
      Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/ListKey.php
  100. 0 47
      Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/SetKey.php

+ 0 - 12
Gameserver/Public/phpRedisAdmin/Dockerfile

@@ -1,12 +0,0 @@
-FROM composer/composer
-
-ADD . /src/app/
-WORKDIR /src/app
-
-RUN \
-  composer install && \
-  cp includes/config.environment.inc.php includes/config.inc.php
-
-EXPOSE 80
-
-ENTRYPOINT [ "php", "-S", "0.0.0.0:80" ]

+ 0 - 58
Gameserver/Public/phpRedisAdmin/README.markdown

@@ -1,58 +0,0 @@
-phpRedisAdmin 1.6.0
-===================
-
-phpRedisAdmin is a simple web interface to manage [Redis](http://redis.io/)
-databases. It is released under the
-[Creative Commons Attribution 3.0 license](http://creativecommons.org/licenses/by/3.0/).
-This code is being developed and maintained by [Erik Dubbelboer](https://github.com/ErikDubbelboer/).
-
-You can send comments, patches, questions
-[here on github](https://github.com/ErikDubbelboer/phpRedisAdmin/issues)
-or to erik@dubbelboer.com.
-
-
-Example
-=======
-
-You can find an example database at
-[http://dubbelboer.com/phpRedisAdmin/](http://dubbelboer.com/phpRedisAdmin/)
-
-
-Installing/Configuring
-======================
-
-To install [phpRedisAdmin](https://packagist.org/packages/erik-dubbelboer/php-redis-admin) through [composer](http://getcomposer.org/) you need to execute the following commands:
-
-```
-curl -s http://getcomposer.org/installer | php
-php composer.phar create-project -s dev erik-dubbelboer/php-redis-admin path/to/install
-```
-
-You may also want to copy includes/config.sample.inc.php to includes/config.inc.php
-and edit it with your specific redis configuration.
-
-Instead of using composer, you can also do a manual install using:
-
-```
-git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
-cd phpRedisAdmin
-git clone https://github.com/nrk/predis.git vendor
-```
-
-TODO
-====
-
-* Encoding support for editing
-* Javascript sorting of tables
-* Better error handling
-* Move or Copy key to different server
-* Importing JSON
-* JSON export with seperate objects based on your seperator
-
-
-Credits
-=======
-
-Icons by [http://p.yusukekamiyamane.com/](http://p.yusukekamiyamane.com/) ([https://github.com/yusukekamiyamane/fugue-icons/tree/master/icons-shadowless](https://github.com/yusukekamiyamane/fugue-icons/tree/master/icons-shadowless))
-
-Favicon from [https://github.com/antirez/redis-io/blob/master/public/images/favicon.png](https://github.com/antirez/redis-io/blob/master/public/images/favicon.png)

+ 0 - 20
Gameserver/Public/phpRedisAdmin/composer.json

@@ -1,20 +0,0 @@
-{
-    "name": "erik-dubbelboer/php-redis-admin",
-    "description": "Simple web interface to manage Redis databases.",
-    "version": "1.6.0",
-    "license": "CC-BY-ND",
-    "homepage": "https://github.com/ErikDubbelboer/phpRedisAdmin",
-    "authors": [
-        {
-            "name": "Erik Dubbelboer",
-            "email": "erik@dubbelboer.com",
-            "homepage": "http://blog.dubbelboer.com",
-            "role": "Developer"
-        }
-    ],
-    "require": {
-        "predis/predis": "1.0.3"
-    },
-    "minimum-stability": "stable",
-    "target-dir": "ErikDubbelboer/phpRedisAdmin"    
-}

+ 0 - 69
Gameserver/Public/phpRedisAdmin/composer.lock

@@ -1,69 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
-        "This file is @generated automatically"
-    ],
-    "hash": "e81aef935c2a6d36cf7690dbdb9d129a",
-    "content-hash": "3212fc4e8463f3bf5ff7db4655eecbf0",
-    "packages": [
-        {
-            "name": "predis/predis",
-            "version": "v1.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/nrk/predis.git",
-                "reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/nrk/predis/zipball/84060b9034d756b4d79641667d7f9efe1aeb8e04",
-                "reference": "84060b9034d756b4d79641667d7f9efe1aeb8e04",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.2"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "~4.0"
-            },
-            "suggest": {
-                "ext-curl": "Allows access to Webdis when paired with phpiredis",
-                "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Predis\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Daniele Alessandri",
-                    "email": "suppakilla@gmail.com",
-                    "homepage": "http://clorophilla.net"
-                }
-            ],
-            "description": "Flexible and feature-complete PHP client library for Redis",
-            "homepage": "http://github.com/nrk/predis",
-            "keywords": [
-                "nosql",
-                "predis",
-                "redis"
-            ],
-            "time": "2015-07-30 18:34:15"
-        }
-    ],
-    "packages-dev": [],
-    "aliases": [],
-    "minimum-stability": "stable",
-    "stability-flags": [],
-    "prefer-stable": false,
-    "prefer-lowest": false,
-    "platform": [],
-    "platform-dev": []
-}

+ 0 - 60
Gameserver/Public/phpRedisAdmin/css/common.css

@@ -1,60 +0,0 @@
-html {
-font-size: x-small; /* Wikipedia font-size scaling method */
-}
-
-body {
-font: 116%/1.4em Verdana, sans-serif;
-color: #000;
-margin: 0;
-padding: 0;
-border: 0;
-height: 100%;
-max-height: 100%;
-width:100%;
-background-color: #fff;
-}
-
-h1 {
-font: bold 190% "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-
-h2 {
-font: bold 160% "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-
-h3 {
-font: bold 130% "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-
-abbr {
-border-bottom: 1px dotted #666;
-}
-
-img {
-border: 0;
-}
-
-
-.clear {
-clear: left;
-}
-
-
-.info {
-color: #aaa;
-font-weight: normal;
-}
-
-
-.add {
-padding: 3px 0 1px 20px;
-background: url(../images/add.png) left center no-repeat;
-}
-
-
-.data {
-white-space: pre-wrap;
-width: 80vw;
-word-wrap: break-word;
-}
-

+ 0 - 55
Gameserver/Public/phpRedisAdmin/css/frame.css

@@ -1,55 +0,0 @@
-form {
-margin: 0;
-}
-
-form p {
-padding-left: 8em;
-margin: 1em 0;
-}
-
-form label {
-float: left;
-width: 7em;
-margin-left: -8em;
-}
-
-form .button {
-margin-left: -7em;
-}
-
-
-#hkeyp, #indexp, #scorep {
-display: none;
-}
-
-
-table {
-border-spacing: 0;
-border-collapse: collapse;
-}
-
-td {
-background-color: #eee;
-border: 2px solid #fff;
-}
-
-.alt td {
-background-color: #ccc;
-}
-
-td div, th div {
-padding: .5em;
-}
-
-
-.imgbut {
-vertical-align: middle;
-margin-top: -4px;
-}
-
-
-.server {
-float: left;
-margin: 1em;
-}
-

+ 0 - 142
Gameserver/Public/phpRedisAdmin/css/index.css

@@ -1,142 +0,0 @@
-#sidebar {
-position: absolute;
-top: 0;
-bottom: 0;
-left: 0;
-width: 290px;
-height: 100%;
-padding-left: 10px;
-border-right: 1px solid #000;
-}
-
-#sidebar a, #sidebar a:visited {
-color: #000;
-}
-
-#sidebar a {
-text-decoration: none;
-}
-
-#sidebar a:hover {
-text-decoration: underline;
-}
-
-
-#keys {
-position: absolute;
-top: 18.5em;
-left: 0;
-bottom: 0;
-width: 290px;
-padding-left: 10px;
-overflow: auto;
-}
-
-#keys ul {
-list-style-type: none;
-margin: 0;
-padding: 0;
-}
-
-#keys li {
-font-weight: normal;
-}
-
-#keys li.folder {
-font-weight: bold;
-margin-top: .05em;
-}
-
-#keys li.current a {
-background-color: #eee;
-}
-
-#keys li.hidden {
-display: none;
-}
-
-#keys .icon {
-padding: 1px 0 1px 20px;
-background: url(../images/folder-open.png) left center no-repeat;
-white-space: nowrap;
-}
-
-#keys li.collapsed ul {
-display: none;
-}
-
-#keys ul ul {
-margin-left: 6px;
-background: url(../images/tree-vline.gif) repeat-y;
-}
-
-#keys ul ul li {
-padding-left: 16px;
-background: url(../images/tree-node.gif) no-repeat;
-}
-
-#keys ul ul li.folder {
-background-image: url(../images/tree-folder-expanded.gif);
-}
-
-#keys ul ul li.folder.collapsed {
-background-image: url(../images/tree-folder-collapsed.gif);
-}
-
-#keys ul ul li.last { /* Hard-coded substitute for :last-child */
-margin-bottom: .3em;
-background: #fff url(../images/tree-lastnode.gif) no-repeat;
-}
-
-#keys ul ul li.last.folder {
-background-image: url(../images/tree-lastnode-expanded.gif);
-}
-
-#keys ul ul li.last.folder.collapsed {
-background-image: url(../images/tree-lastnode-collapsed.gif);
-}
-
-#keys .deltree {
-display: none;
-}
-
-#keys .icon:hover .deltree {
-display: inline;
-}
-
-#resize {
-position: fixed;
-top: 0;
-left: 300px;
-bottom: 0;
-width: 5px;
-background-color: #aaa;
-cursor: col-resize;
-padding: 0;
-margin: 0;
-}
-
-#resize-layover {
-position: fixed;
-top: 0;
-left: 305px;
-right: 0;
-bottom: 0;
-width: 100%;
-z-index: 1000;
-}
-
-#frame {
-position: fixed;
-top: 0;
-left: 305px;
-right: 0;
-bottom: 0;
-padding-left: 2em;
-}
-
-#frame iframe {
-width: 100%;
-height: 100%;
-}
-

+ 0 - 63
Gameserver/Public/phpRedisAdmin/delete.php

@@ -1,63 +0,0 @@
-<?php
-
-
-if (!isset($_POST['post'])) {
-  die('Javascript needs to be enabled for you to delete keys.');
-}
-
-
-require_once 'includes/common.inc.php';
-
-
-if (isset($_GET['key'])) {
-  // String
-  if (!isset($_GET['type']) || ($_GET['type'] == 'string')) {
-    // Delete the whole key.
-    $redis->del($_GET['key']);
-  }
-
-  // Hash
-  else if (($_GET['type'] == 'hash') && isset($_GET['hkey'])) {
-    // Delete only the field in the hash.
-    $redis->hDel($_GET['key'], $_GET['hkey']);
-  }
-
-  // List
-  else if (($_GET['type'] == 'list') && isset($_GET['index'])) {
-    // Lists don't have simple delete operations.
-    // You can only remove something based on a value so we set the value at the index to some random value we hope doesn't occur elsewhere in the list.
-    $value = str_rand(69);
-
-    // This code assumes $value is not present in the list. To make sure of this we would need to check the whole list and place a Watch on it to make sure the list isn't modified in between.
-    $redis->lSet($_GET['key'], $_GET['index'], $value);
-    $redis->lRem($_GET['key'], 1, $value);
-  }
-
-  // Set
-  else if (($_GET['type'] == 'set') && isset($_GET['value'])) {
-    // Removing members from a set can only be done by supplying the member.
-    $redis->sRem($_GET['key'], $_GET['value']);
-  }
-
-  // ZSet
-  else if (($_GET['type'] == 'zset') && isset($_GET['value'])) {
-    // Removing members from a zset can only be done by supplying the value.
-    $redis->zRem($_GET['key'], $_GET['value']);
-  }
-
-
-  die('?view&s='.$server['id'].'&d='.$server['db'].'&key='.urlencode($_GET['key']));
-}
-
-
-if (isset($_GET['tree'])) {
-  $keys = $redis->keys($_GET['tree'].'*');
-
-  foreach ($keys as $key) {
-    $redis->del($key);
-  }
-
-  die('?view&s='.$server['id'].'&d='.$server['db']);
-}
-
-?>

+ 0 - 194
Gameserver/Public/phpRedisAdmin/edit.php

@@ -1,194 +0,0 @@
-<?php
-
-require_once 'includes/common.inc.php';
-
-
-
-
-// Are we editing or creating a new key?
-$edit = false;
-
-if (isset($_GET['key'], $_GET['type'])) {
-  if (($_GET['type'] == 'string') ||
-      (($_GET['type'] == 'hash') && isset($_GET['hkey']))  ||
-      (($_GET['type'] == 'list') && isset($_GET['index'])) ||
-      (($_GET['type'] == 'set' ) && isset($_GET['value'])) ||
-      (($_GET['type'] == 'zset') && isset($_GET['value']))) {
-    $edit = true;
-  }
-}
-
-
-
-
-if (isset($_POST['type'], $_POST['key'], $_POST['value'])) {
-  // Don't allow keys that are to long (Redis supports keys that can be way to long to put in an url).
-  if (strlen($_POST['key']) > $config['maxkeylen']) {
-    die('ERROR: Your key is to long (max length is '.$config['maxkeylen'].')');
-  }
-
-  $key   = input_convert($_POST['key']);
-  $value = input_convert($_POST['value']);
-  $value = encodeOrDecode('save', $key, $value);
-
-  if ($value === false || is_null($value)) {
-    die('ERROR: could not encode value');
-  }
-
-  // String
-  if ($_POST['type'] == 'string') {
-    $redis->set($key, $value);
-  }
-
-  // Hash
-  else if (($_POST['type'] == 'hash') && isset($_POST['hkey'])) {
-    if (strlen($_POST['hkey']) > $config['maxkeylen']) {
-      die('ERROR: Your hash key is to long (max length is '.$config['maxkeylen'].')');
-    }
-
-    if ($edit && !$redis->hExists($key, input_convert($_POST['hkey']))) {
-      $redis->hDel($key, input_convert($_GET['hkey']));
-    }
-
-    $redis->hSet($key, input_convert($_POST['hkey']), $value);
-  }
-
-  // List
-  else if (($_POST['type'] == 'list') && isset($_POST['index'])) {
-    $size = $redis->lLen($key);
-
-    if (($_POST['index'] == '') ||
-        ($_POST['index'] == $size) ||
-        ($_POST['index'] == -1)) {
-      // Push it at the end
-      $redis->rPush($key, $value);
-    } else if (($_POST['index'] >= 0) &&
-               ($_POST['index'] < $size)) {
-      // Overwrite an index
-      $redis->lSet($key, input_convert($_POST['index']), $value);
-    } else {
-      die('ERROR: Out of bounds index');
-    }
-  }
-
-  // Set
-  else if ($_POST['type'] == 'set') {
-    if ($_POST['value'] != $_POST['oldvalue']) {
-      // The only way to edit a Set value is to add it and remove the old value.
-      $redis->sRem($key, encodeOrDecode('save', $key, input_convert($_POST['oldvalue'])));
-      $redis->sAdd($key, $value);
-    }
-  }
-
-  // ZSet
-  else if (($_POST['type'] == 'zset') && isset($_POST['score'])) {
-    // The only way to edit a ZSet value is to add it and remove the old value.
-    $redis->zRem($key, encodeOrDecode('save', $key, input_convert($_POST['oldvalue'])));
-    $redis->zAdd($key, input_convert($_POST['score']), $value);
-  }
-
-
-
-  // Refresh the top so the key tree is updated.
-  require 'includes/header.inc.php';
-
-  ?>
-  <script>
-  top.location.href = top.location.pathname+'?view&s=<?php echo $server['id']?>&d=<?php echo $server['db']?>&key=<?php echo urlencode($_POST['key'])?>';
-  </script>
-  <?php
-
-  require 'includes/footer.inc.php';
-  die;
-}
-
-
-
-
-// Get the current value.
-$value = '';
-
-if ($edit) {
-  // String
-  if ($_GET['type'] == 'string') {
-    $value = $redis->get($_GET['key']);
-  }
-
-  // Hash
-  else if (($_GET['type'] == 'hash') && isset($_GET['hkey'])) {
-    $value = $redis->hGet($_GET['key'], $_GET['hkey']);
-  }
-
-  // List
-  else if (($_GET['type'] == 'list') && isset($_GET['index'])) {
-    $value = $redis->lIndex($_GET['key'], $_GET['index']);
-  }
-
-  // Set, ZSet
-  else if ((($_GET['type'] == 'set') || ($_GET['type'] == 'zset')) && isset($_GET['value'])) {
-    $value = $_GET['value'];
-  }
-
-  $value = encodeOrDecode('load', $_GET['key'], $value);
-}
-
-
-
-
-$page['css'][] = 'frame';
-$page['js'][]  = 'frame';
-
-require 'includes/header.inc.php';
-
-?>
-<h2><?php echo $edit ? 'Edit' : 'Add'?></h2>
-<form action="<?php echo format_html($_SERVER['REQUEST_URI'])?>" method="post">
-
-<p>
-<label for="type">Type:</label>
-<select name="type" id="type">
-<option value="string" <?php echo (isset($_GET['type']) && ($_GET['type'] == 'string')) ? 'selected="selected"' : ''?>>String</option>
-<option value="hash"   <?php echo (isset($_GET['type']) && ($_GET['type'] == 'hash'  )) ? 'selected="selected"' : ''?>>Hash</option>
-<option value="list"   <?php echo (isset($_GET['type']) && ($_GET['type'] == 'list'  )) ? 'selected="selected"' : ''?>>List</option>
-<option value="set"    <?php echo (isset($_GET['type']) && ($_GET['type'] == 'set'   )) ? 'selected="selected"' : ''?>>Set</option>
-<option value="zset"   <?php echo (isset($_GET['type']) && ($_GET['type'] == 'zset'  )) ? 'selected="selected"' : ''?>>ZSet</option>
-</select>
-</p>
-
-<p>
-<label for="key">Key:</label>
-<input type="text" name="key" id="key" size="30" <?php echo isset($_GET['key']) ? 'value="'.format_html($_GET['key']).'"' : ''?>>
-</p>
-
-<p id="hkeyp">
-<label for="khey">Hash key:</label>
-<input type="text" name="hkey" id="hkey" size="30" <?php echo isset($_GET['hkey']) ? 'value="'.format_html($_GET['hkey']).'"' : ''?>>
-</p>
-
-<p id="indexp">
-<label for="index">Index:</label>
-<input type="text" name="index" id="index" size="30" <?php echo isset($_GET['index']) ? 'value="'.format_html($_GET['index']).'"' : ''?>> <span class="info">empty to append, -1 to prepend</span>
-</p>
-
-<p id="scorep">
-<label for="score">Score:</label>
-<input type="text" name="score" id="score" size="30" <?php echo isset($_GET['score']) ? 'value="'.format_html($_GET['score']).'"' : ''?>>
-</p>
-
-<p>
-<label for="value">Value:</label>
-<textarea name="value" id="value" cols="80" rows="20"><?php echo format_html($value)?></textarea>
-</p>
-
-<input type="hidden" name="oldvalue" value="<?php echo format_html($value)?>">
-
-<p>
-<input type="submit" class="button" value="<?php echo $edit ? 'Edit' : 'Add'?>">
-</p>
-
-</form>
-<?php
-
-require 'includes/footer.inc.php';
-
-?>

+ 0 - 180
Gameserver/Public/phpRedisAdmin/export.php

@@ -1,180 +0,0 @@
-<?php
-require_once 'includes/common.inc.php';
-
-// Export to redis-cli commands
-function export_redis($key)
-{
-    global $redis;
-
-    $type = $redis->type($key);
-
-
-    // String
-    if ($type == 'string') {
-        echo 'SET "', addslashes($key), '" "', addslashes($redis->get($key)), '"', PHP_EOL;
-    }
-
-    // Hash
-    else if ($type == 'hash') {
-        $values = $redis->hGetAll($key);
-
-        foreach ($values as $k => $v) {
-            echo 'HSET "', addslashes($key), '" "', addslashes($k), '" "', addslashes($v), '"', PHP_EOL;
-        }
-    }
-
-    // List
-    else if ($type == 'list') {
-        $size = $redis->lLen($key);
-
-        for ($i = 0; $i < $size; ++$i) {
-            echo 'RPUSH "', addslashes($key), '" "', addslashes($redis->lIndex($key, $i)), '"', PHP_EOL;
-        }
-    }
-
-    // Set
-    else if ($type == 'set') {
-        $values = $redis->sMembers($key);
-
-        foreach ($values as $v) {
-            echo 'SADD "', addslashes($key), '" "', addslashes($v), '"', PHP_EOL;
-        }
-    }
-
-    // ZSet
-    else if ($type == 'zset') {
-        $values = $redis->zRange($key, 0, -1);
-
-        foreach ($values as $v) {
-            $s = $redis->zScore($key, $v);
-
-            echo 'ZADD "', addslashes($key), '" ', $s, ' "', addslashes($v), '"', PHP_EOL;
-        }
-    }
-}
-
-// Return the JSON for this key
-function export_json($key)
-{
-    global $redis;
-
-    $type = $redis->type($key);
-
-
-    // String
-    if ($type == 'string') {
-        $value = $redis->get($key);
-    }
-
-    // Hash
-    else if ($type == 'hash') {
-        $value = $redis->hGetAll($key);
-    }
-
-    // List
-    else if ($type == 'list') {
-        $size = $redis->lLen($key);
-        $value = array();
-
-        for ($i = 0; $i < $size; ++$i) {
-            $value[] = $redis->lIndex($key, $i);
-        }
-    }
-
-    // Set
-    else if ($type == 'set') {
-        $value = $redis->sMembers($key);
-    }
-
-    // ZSet
-    else if ($type == 'zset') {
-        $value = $redis->zRange($key, 0, -1);
-    }
-
-
-    return $value;
-}
-
-// Export
-if (isset($_POST['type'])) {
-    if ($_POST['type'] == 'json') {
-        $ext = 'js';
-        $ct = 'application/json';
-    } else {
-        $ext = 'redis';
-        $ct = 'text/plain';
-    }
-
-
-    header('Content-type: ' . $ct . '; charset=utf-8');
-    if (isset($_POST['tofile']) && strtolower($_POST['tofile']) == 'on') {
-        header('Content-Disposition: attachment; filename="export.' . $ext . '"');
-    } else {
-        header('Content-Disposition: inline; filename="export.' . $ext . '"');
-    }
-
-
-    // JSON
-    if ($_POST['type'] == 'json') {
-        // Single key
-        if (isset($_GET['key'])) {
-            echo json_encode(export_json($_GET['key']));
-        } else { // All keys
-            $keys = $redis->keys('*');
-            $vals = array();
-
-            foreach ($keys as $key) {
-                $vals[$key] = export_json($key);
-            }
-
-            echo json_encode($vals);
-        }
-    }
-
-    // Redis Commands
-    else {
-        // Single key
-        if (isset($_GET['key'])) {
-            export_redis($_GET['key']);
-        } else { // All keys
-            $keys = $redis->keys('*');
-
-            foreach ($keys as $key) {
-                export_redis($key);
-            }
-        }
-    }
-
-
-    die;
-}
-
-
-
-
-$page['css'][] = 'frame';
-$page['js'][] = 'frame';
-
-require 'includes/header.inc.php';
-?>
-<h2>Export <?php echo isset($_GET['key']) ? format_html($_GET['key']) : '' ?></h2>
-
-<form action="<?php echo format_html($_SERVER['REQUEST_URI']) ?>" method="post">
-
-    <p>
-        <label for="type">Type:</label>
-        <select name="type" id="type">
-            <option value="redis" <?php echo (isset($_GET['type']) && ($_GET['type'] == 'redis')) ? 'selected="selected"' : '' ?>>Redis</option>
-            <option value="json"  <?php echo (isset($_GET['type']) && ($_GET['type'] == 'json' )) ? 'selected="selected"' : '' ?>>JSON</option>
-        </select>
-
-    </p>
-
-    <p>
-        <input type="submit" class="button" value="Export">  <input type="checkbox" name="tofile" value="ON" /> to file
-    </p>
-
-</form>
-<?php
-require 'includes/footer.inc.php';
-?>

+ 0 - 13
Gameserver/Public/phpRedisAdmin/flush.php

@@ -1,13 +0,0 @@
-<?php
-
-
-if (!isset($_POST['post'])) {
-  die('Javascript needs to be enabled for you to flush a database.');
-}
-
-
-require_once 'includes/common.inc.php';
-
-
-$redis->flushdb();
-

BIN
Gameserver/Public/phpRedisAdmin/images/add.png


BIN
Gameserver/Public/phpRedisAdmin/images/delete.png


BIN
Gameserver/Public/phpRedisAdmin/images/edit.png


BIN
Gameserver/Public/phpRedisAdmin/images/export.png


BIN
Gameserver/Public/phpRedisAdmin/images/favicon.png


BIN
Gameserver/Public/phpRedisAdmin/images/flush.png


BIN
Gameserver/Public/phpRedisAdmin/images/folder-open.png


BIN
Gameserver/Public/phpRedisAdmin/images/import.png


BIN
Gameserver/Public/phpRedisAdmin/images/info.png


BIN
Gameserver/Public/phpRedisAdmin/images/logout.png


BIN
Gameserver/Public/phpRedisAdmin/images/reset.png


BIN
Gameserver/Public/phpRedisAdmin/images/save.png


BIN
Gameserver/Public/phpRedisAdmin/images/tree-folder-collapsed.gif


BIN
Gameserver/Public/phpRedisAdmin/images/tree-folder-expanded.gif


BIN
Gameserver/Public/phpRedisAdmin/images/tree-lastnode-collapsed.gif


BIN
Gameserver/Public/phpRedisAdmin/images/tree-lastnode-expanded.gif


BIN
Gameserver/Public/phpRedisAdmin/images/tree-lastnode.gif


BIN
Gameserver/Public/phpRedisAdmin/images/tree-node.gif


BIN
Gameserver/Public/phpRedisAdmin/images/tree-vline.gif


+ 0 - 117
Gameserver/Public/phpRedisAdmin/import.php

@@ -1,117 +0,0 @@
-<?php
-require_once 'includes/common.inc.php';
-
-
-
-
-// This mess could need some cleanup!
-if (isset($_POST['commands'])) {
-    // Append some spaces at the end to make sure we always have enough arguments for the last function.
-    $commands = str_getcsv(str_replace(array("\r", "\n"), array('', ' '), $_POST['commands']) . '    ', ' ');
-
-    foreach ($commands as &$command) {
-        $command = stripslashes($command);
-    }
-    unset($command);
-
-    for ($i = 0; $i < count($commands); ++$i) {
-        if (empty($commands[$i])) {
-            continue;
-        }
-
-        $commands[$i] = strtoupper($commands[$i]);
-
-        switch ($commands[$i]) {
-            case 'SET': {
-                    $redis->set($commands[$i + 1], $commands[$i + 2]);
-                    $i += 2;
-                    break;
-                }
-
-            case 'HSET': {
-                    $redis->hSet($commands[$i + 1], $commands[$i + 2], $commands[$i + 3]);
-
-                    $i += 3;
-                    break;
-                }
-
-            case 'LPUSH': {
-                    $redis->lPush($commands[$i + 1], $commands[$i + 2]);
-                    $i += 2;
-                    break;
-                }
-
-            case 'RPUSH': {
-                    $redis->rPush($commands[$i + 1], $commands[$i + 2]);
-                    $i += 2;
-                    break;
-                }
-
-            case 'LSET': {
-                    $redis->lSet($commands[$i + 1], $commands[$i + 2], $commands[$i + 3]);
-                    $i += 3;
-                    break;
-                }
-
-            case 'SADD': {
-                    $redis->sAdd($commands[$i + 1], $commands[$i + 2]);
-                    $i += 2;
-                    break;
-                }
-
-            case 'ZADD': {
-                    $redis->zAdd($commands[$i + 1], $commands[$i + 2], $commands[$i + 3]);
-                    $i += 3;
-                    break;
-                }
-        }
-    }
-
-
-    // Refresh the top so the key tree is updated.
-    require 'includes/header.inc.php';
-    ?>
-    <script>
-        top.location.href = top.location.pathname + '?overview&s=<?php echo $server['id'] ?>&d=<?php echo $server['db'] ?>';
-    </script>
-    <?php
-    require 'includes/footer.inc.php';
-    die;
-}
-
-
-
-
-$page['css'][] = 'frame';
-$page['js'][] = 'frame';
-
-require 'includes/header.inc.php';
-?>
-<h2>Import</h2>
-<form action="<?php echo format_html($_SERVER['REQUEST_URI']) ?>" method="post">
-
-    <p>
-        <label for="commands">Commands:<br>
-            <br>
-            <span class="info">
-                Valid are:<br>
-                SET<br>
-                HSET<br>
-                LPUSH<br>
-                RPUSH<br>
-                LSET<br>
-                SADD<br>
-                ZADD
-            </span>
-        </label>
-        <textarea name="commands" id="commands" cols="80" rows="20"></textarea>
-    </p>
-
-    <p>
-        <input type="submit" class="button" value="Import">
-    </p>
-
-</form>
-<?php
-require 'includes/footer.inc.php';
-?>

+ 0 - 136
Gameserver/Public/phpRedisAdmin/includes/common.inc.php

@@ -1,136 +0,0 @@
-<?php
-
-require __DIR__ . '/../predis/autoload.php';
-
-define('PHPREDIS_ADMIN_PATH', dirname(__DIR__)); # 等效于 dirname(dirname(__FILE__))
-#
-// Undo magic quotes (both in keys and values)
-//if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
-//    $process = array(&$_GET, &$_POST);
-//
-//    while (list($key, $val) = each($process)) {
-//        foreach ($val as $k => $v) {
-//            unset($process[$key][$k]);
-//
-//            if (is_array($v)) {
-//                $process[$key][stripslashes($k)] = $v;
-//                $process[] = &$process[$key][stripslashes($k)];
-//            } else {
-//                $process[$key][stripslashes($k)] = stripslashes($v);
-//            }
-//        }
-//    }
-//
-//    unset($process);
-//}
-// These includes are needed by each script.
-if (file_exists(PHPREDIS_ADMIN_PATH . '/includes/config.inc.php')) {
-    require_once PHPREDIS_ADMIN_PATH . '/includes/config.inc.php';
-} else {
-    require_once PHPREDIS_ADMIN_PATH . '/includes/config.sample.inc.php';
-}
-require_once PHPREDIS_ADMIN_PATH . '/includes/functions.inc.php';
-require_once PHPREDIS_ADMIN_PATH . '/includes/page.inc.php';
-
-if (isset($config['login'])) {
-    require_once PHPREDIS_ADMIN_PATH . '/includes/login.inc.php';
-}
-
-
-if (isset($login['servers'])) {
-    $i = current($login['servers']);
-} else {
-    $i = 0;
-}
-
-
-if (isset($_GET['s']) && is_numeric($_GET['s']) && ($_GET['s'] < count($config['servers']))) {
-    $i = $_GET['s'];
-}
-
-$server = $config['servers'][$i];
-$server['id'] = $i;
-$server['charset'] = isset($server['charset']) && $server['charset'] ? $server['charset'] : false;
-
-
-mb_internal_encoding('utf-8');
-
-
-if (isset($login, $login['servers'])) {
-    if (array_search($i, $login['servers']) === false) {
-        die('You are not allowed to access this database.');
-    }
-
-    foreach ($config['servers'] as $key => $ignore) {
-        if (array_search($key, $login['servers']) === false) {
-            unset($config['servers'][$key]);
-        }
-    }
-}
-
-
-if (!isset($server['db'])) {
-    if (isset($_GET['d']) && is_numeric($_GET['d'])) {
-        $server['db'] = $_GET['d'];
-    } else {
-        $server['db'] = 0;
-    }
-}
-
-
-if (!isset($server['filter'])) {
-    $server['filter'] = '*';
-}
-
-// filter from GET param
-if (isset($_GET['filter']) && $_GET['filter'] != '') {
-    $server['filter'] = $_GET['filter'];
-    if (strpos($server['filter'], '*') === false) {
-        $server['filter'] .= '*';
-    }
-}
-
-if (!isset($server['seperator'])) {
-    $server['seperator'] = $config['seperator'];
-}
-
-if (!isset($server['keys'])) {
-    $server['keys'] = $config['keys'];
-}
-
-if (!isset($server['scansize'])) {
-    $server['scansize'] = $config['scansize'];
-}
-
-if (!isset($server['serialization'])) {
-    if (isset($config['serialization'])) {
-        $server['serialization'] = $config['serialization'];
-    }
-}
-
-// Setup a connection to Redis.
-if (isset($server['scheme']) && $server['scheme'] === 'unix' && $server['path']) {
-    $redis = new Predis\Client(array('scheme' => 'unix', 'path' => $server['path']));
-} else {
-    $redis = !$server['port'] ? new Predis\Client($server['host']) : new Predis\Client('tcp://' . $server['host'] . ':' . $server['port']);
-}
-
-try {
-    $redis->connect();
-} catch (Predis\CommunicationException $exception) {
-    $redis = false;
-}
-
-if (isset($server['auth'])) {
-    if (!$redis->auth($server['auth'])) {
-        die('ERROR: Authentication failed (' . $server['host'] . ':' . $server['port'] . ')');
-    }
-}
-
-
-if ($server['db'] != 0) {
-    if (!$redis->select($server['db'])) {
-        die('ERROR: Selecting database failed (' . $server['host'] . ':' . $server['port'] . ',' . $server['db'] . ')');
-    }
-}
-?>

+ 0 - 46
Gameserver/Public/phpRedisAdmin/includes/config.environment.inc.php

@@ -1,46 +0,0 @@
-<?php
-
-include 'config.sample.inc.php';
-
-$admin_user = getenv('ADMIN_USER');
-$admin_pass = getenv('ADMIN_PASS');
-
-if (!empty($admin_user)) {
-  $config['login'] = array(
-    $admin_user => array(
-      'password' => $admin_pass,
-    ),
-  );
-}
-
-$i=1;
-
-while (TRUE) {
-
-  $prefix = 'REDIS_' . $i . '_';
-
-  $server_name = getenv($prefix . 'NAME');
-  $server_host = getenv($prefix . 'HOST');
-  $server_port = getenv($prefix . 'PORT');
-
-  if (empty($server_host)) {
-    break;
-  }
-
-  if (empty($server_name)) {
-    $server_name = $server_host;
-  }
-
-  if (empty($server_port)) {
-    $server_port = 6379;
-  }
-
-  $config['servers'][] = array(
-      'name'   => $server_name,
-      'host'   => $server_host,
-      'port'   => $server_port,
-      'filter' => '*',
-  );
-
-  $i++;
-}

+ 0 - 28
Gameserver/Public/phpRedisAdmin/includes/config.inc.php

@@ -1,28 +0,0 @@
-<?php
-
-// 仅从主项目导入必要配置
-include_once __DIR__ . '/../../globals.php';
-require_once __DIR__ . '/../../Amfphp/config.php';
-
-use loyalsoft\config as lyconfig;
-
-// 注意: 此处的配置数据也叫config, 但是与主项目中的$config并没有产生冲突,
-//      因为入口不一样, 各自导入自己的config
-$config = array(
-    'servers' => array(
-        array(
-            'name' => PROJECTNAME, #               # from globals.php
-            'host' => lyconfig::Inst()->nosql->host, # from config.php
-            'port' => lyconfig::Inst()->nosql->port, # ..
-            'auth' => lyconfig::Inst()->nosql->pwd, ## ..
-            'filter' => 'gamecfg-*', #             # configed by gwang
-            'flush' => false, #                    # 不能从这里操作
-            'databases' => 1, #                    # 云平台限制,仅能有一个db
-        ),
-    ),
-    'seperator' => '-',
-    'maxkeylen' => 100,
-    'count_elements_page' => 100,
-    'keys' => false, // 推荐false, btw 需要redis 2.8以上的版本支持. -- wanggang
-    'scansize' => 50
-);

+ 0 - 82
Gameserver/Public/phpRedisAdmin/includes/config.sample.inc.php

@@ -1,82 +0,0 @@
-<?php
-//Copy this file to config.inc.php and make changes to that file to customize your configuration.
-
-$config = array(
-  'servers' => array(
-    array(
-      'name'   => 'local server', // Optional name.
-      'host'   => '127.0.0.1',
-      'port'   => 6379,
-      'filter' => '*',
-      'scheme' => 'tcp', // Optional. Connection scheme. 'tcp' - for TCP connection, 'unix' - for connection by unix domain socket
-      'path'   => '' // Optional. Path to unix domain socket. Uses only if 'scheme' => 'unix'. Example: '/var/run/redis/redis.sock'
-
-      // Optional Redis authentication.
-      //'auth' => 'redispasswordhere' // Warning: The password is sent in plain-text to the Redis server.
-    ),
-
-    /*array(
-      'host' => 'localhost',
-      'port' => 6380
-    ),*/
-
-    /*array(
-      'name'      => 'local db 2',
-      'host'      => 'localhost',
-      'port'      => 6379,
-      'db'        => 1,             // Optional database number, see http://redis.io/commands/select
-      'databases' => 1,             // Optional number of databases (prevents use of CONFIG command).
-      'filter'    => 'something:*', // Show only parts of database for speed or security reasons.
-      'seperator' => '/',           // Use a different seperator on this database (default uses config default).
-      'flush'     => false,         // Set to true to enable the flushdb button for this instance.
-      'charset'   => 'cp1251',      // Keys and values are stored in redis using this encoding (default utf-8).
-      'keys'      => false,         // Use the old KEYS command instead of SCAN to fetch all keys for this server (default uses config default).
-      'scansize'  => 1000           // How many entries to fetch using each SCAN command for this server (default uses config default).
-    ),*/
-  ),
-
-
-  'seperator' => ':',
-
-
-  // Uncomment to show less information and make phpRedisAdmin fire less commands to the Redis server. Recommended for a really busy Redis server.
-  //'faster' => true,
-
-
-  // Uncomment to enable HTTP authentication
-  /*'login' => array(
-    // Username => Password
-    // Multiple combinations can be used
-    'admin' => array(
-      'password' => 'adminpassword',
-    ),
-    'guest' => array(
-      'password' => '',
-      'servers'  => array(1) // Optional list of servers this user can access.
-    )
-  ),*/
-
-
-  /*'serialization' => array(
-    'foo*' => array( // Match like KEYS
-      // Function called when saving to redis.
-      'save' => function($data) { return json_encode(json_decode($data)); },
-      // Function called when loading from redis.
-      'load' => function($data) { return json_encode(json_decode($data), JSON_PRETTY_PRINT); },
-    ),
-  ),*/
-
-
-  // You can ignore settings below this point.
-
-  'maxkeylen'           => 100,
-  'count_elements_page' => 100,
-
-  // Use the old KEYS command instead of SCAN to fetch all keys.
-  'keys' => false,
-
-  // How many entries to fetch using each SCAN command.
-  'scansize' => 1000
-);
-
-?>

+ 0 - 2
Gameserver/Public/phpRedisAdmin/includes/footer.inc.php

@@ -1,2 +0,0 @@
-</body>
-</html>

+ 0 - 103
Gameserver/Public/phpRedisAdmin/includes/functions.inc.php

@@ -1,103 +0,0 @@
-<?php
-
-function format_html($str) {
-  global $server;
-
-  if (isset($server['charset']) && $server['charset']) {
-    $res = mb_convert_encoding($str, 'utf-8', $server['charset']);
-  } else {
-    $res = $str;
-  }
-
-  $res = htmlentities($res, defined('ENT_SUBSTITUTE') ? (ENT_QUOTES | ENT_SUBSTITUTE) : ENT_QUOTES, 'utf-8');
-
-  return ($res || !$str) ? $res :  '(' . strlen($str) . ' bytes)';
-}
-
-
-function input_convert($str) {
-  global $server;
-
-  if (isset($server['charset']) && $server['charset']) {
-    return mb_convert_encoding($str, $server['charset'], 'utf-8');
-  } else {
-    return $str;
-  }
-}
-
-
-function format_ago($time, $ago = false) {
-  $minute = 60;
-  $hour   = $minute * 60;
-  $day    = $hour   * 24;
-
-  $when = $time;
-
-  if ($when >= 0)
-    $suffix = 'ago';
-  else {
-    $when = -$when;
-    $suffix = 'in the future';
-  }
-
-  if ($when > $day) {
-    $when = round($when / $day);
-    $what = 'day';
-  } else if ($when > $hour) {
-    $when = round($when / $hour);
-    $what = 'hour';
-  } else if ($when > $minute) {
-    $when = round($when / $minute);
-    $what = 'minute';
-  } else {
-    $what = 'second';
-  }
-
-  if ($when != 1) $what .= 's';
-
-  if ($ago) {
-    return "$when $what $suffix";
-  } else {
-    return "$when $what";
-  }
-}
-
-
-function format_size($size) {
-  $sizes = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
-
-  if ($size == 0) {
-    return '0 B';
-  } else {
-    return round($size / pow(1024, ($i = floor(log($size, 1024)))), 1).' '.$sizes[$i];
-  }
-}
-
-
-function str_rand($length) {
-  $r = '';
-
-  for (; $length > 0; --$length) {
-    $r .= chr(rand(32, 126)); // 32 - 126 is the printable ascii range
-  }
-
-  return $r;
-}
-
-
-function encodeOrDecode($action, $key, $data) {
-  global $server;
-
-  if (isset($_GET['raw']) || !isset($server['serialization'])) {
-    return $data;
-  }
-
-  foreach ($server['serialization'] as $pattern => $closures) {
-    if (fnmatch($pattern, $key)) {
-      return $closures[$action]($data);
-    }
-  }
-
-  return $data;
-}
-

+ 0 - 44
Gameserver/Public/phpRedisAdmin/includes/header.inc.php

@@ -1,44 +0,0 @@
-<?php
-
-$version = '1-1-1';
-
-header('Content-Type: text/html; charset=utf-8');
-header('Cache-Control: private');
-
-?>
-<!DOCTYPE html>
-<html lang=en>
-<head>
-<meta charset=utf-8>
-
-<?php 
-    if (is_ie()) {
-  // Always force latest IE rendering engine and chrome frame (also hides compatibility mode button)
-?>
-    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
-<?php
-    } 
-?>
-
-<?php /* Disable phone number detection on apple devices. */?>
-<meta name=format-detection content="telephone=no">
-
-<?php /* I don't think we ever want this to be indexed*/ ?>
-<meta name=robots content="noindex,nofollow,noarchive">
-
-<meta name=author content="https://github.com/ErikDubbelboer/">
-
-<title><?php echo format_html($server['host'])?> - phpRedisAdmin</title>
-
-<?php foreach ($page['css'] as $css) { ?>
-<link rel=stylesheet href="css/<?php echo $css; ?>.css?v=<?php echo $version;?>" media=all>
-<?php } ?>
-
-<link rel="shortcut icon" href="images/favicon.png">
-
-<?php foreach ($page['js'] as $js) { ?>
-<script src="js/<?php echo $js; ?>.js?v=<?php echo $version;?>"></script>
-<?php } ?>
-
-</head>
-<body>

+ 0 - 63
Gameserver/Public/phpRedisAdmin/includes/login.inc.php

@@ -1,63 +0,0 @@
-<?php
-
-// This fill will perform HTTP digest authentication. This is not the most secure form of authentication so be carefull when using this.
-
-
-$realm = 'phpRedisAdmin';
-
-// Using the md5 of the user agent and IP should make it a bit harder to intercept and reuse the responses.
-$opaque = md5('phpRedisAdmin'.$_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR']);
-
-
-if (!isset($_SERVER['PHP_AUTH_DIGEST']) || empty($_SERVER['PHP_AUTH_DIGEST'])) {
-  header('HTTP/1.1 401 Unauthorized');
-  header('WWW-Authenticate: Digest realm="'.$realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.$opaque.'"');
-  die;
-}
-
-$needed_parts = array(
-  'nonce'    => 1,
-  'nc'       => 1,
-  'cnonce'   => 1,
-  'qop'      => 1,
-  'username' => 1,
-  'uri'      => 1,
-  'response' => 1
- );
-
-$data = array();
-$keys = implode('|', array_keys($needed_parts));
-
-preg_match_all('/('.$keys.')=(?:([\'"])([^\2]+?)\2|([^\s,]+))/', $_SERVER['PHP_AUTH_DIGEST'], $matches, PREG_SET_ORDER);
-
-foreach ($matches as $m) {
-  $data[$m[1]] = $m[3] ? $m[3] : $m[4];
-  unset($needed_parts[$m[1]]);
-}
-
-if (!empty($needed_parts)) {
-  header('HTTP/1.1 401 Unauthorized');
-  header('WWW-Authenticate: Digest realm="'.$realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.$opaque.'"');
-  die;
-}
-
-if (!isset($config['login'][$data['username']])) {
-  header('HTTP/1.1 401 Unauthorized');
-  header('WWW-Authenticate: Digest realm="'.$realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.$opaque.'"');
-  die('Invalid username and/or password combination.');
-}
-
-$login         = $config['login'][$data['username']];
-$login['name'] = $data['username'];
-
-$password = md5($login['name'].':'.$realm.':'.$login['password']);
-
-$response = md5($password.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.md5($_SERVER['REQUEST_METHOD'].':'.$data['uri']));
-
-if ($data['response'] != $response) {
-  header('HTTP/1.1 401 Unauthorized');
-  header('WWW-Authenticate: Digest realm="'.$realm.'",qop="auth",nonce="'.uniqid().'",opaque="'.$opaque.'"');
-  die('Invalid username and/or password combination.');
-}
-
-?>

+ 0 - 22
Gameserver/Public/phpRedisAdmin/includes/page.inc.php

@@ -1,22 +0,0 @@
-<?php
-
-
-// Returns true when the user is using IE
-function is_ie() {
-  if (isset($_SERVER['HTTP_USER_AGENT']) &&
-      (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) {
-    return true;
-  } else {
-    return false;
-  }
-}
-
-
-
-
-$page = array(
-  'css' => array('common'),
-  'js'  => array('jquery')
-);
-
-?>

+ 0 - 240
Gameserver/Public/phpRedisAdmin/index.php

@@ -1,240 +0,0 @@
-<?php
-
-require_once 'includes/common.inc.php';
-
-if($redis) {
-
-    if (!empty($server['keys'])) {
-        $keys = $redis->keys($server['filter']);
-    } else {
-        $next = 0;
-        $keys = array();
-
-        while (true) {
-            $r = $redis->scan($next, 'MATCH', $server['filter'], 'COUNT', $server['scansize']);
-
-            $next = $r[0];
-            $keys = array_merge($keys, $r[1]);
-
-            if ($next == 0) {
-                break;
-            }
-        }
-    }
-
-    sort($keys);
-
-    $namespaces = array(); // Array to hold our top namespaces.
-
-    // Build an array of nested arrays containing all our namespaces and containing keys.
-    foreach ($keys as $key) {
-      // Ignore keys that are to long (Redis supports keys that can be way to long to put in an url).
-      if (strlen($key) > $config['maxkeylen']) {
-        continue;
-      }
-
-      $key = explode($server['seperator'], $key);
-
-      // $d will be a reference to the current namespace.
-      $d = &$namespaces;
-
-      // We loop though all the namespaces for this key creating the array for each.
-      // Each time updating $d to be a reference to the last namespace so we can create the next one in it.
-      for ($i = 0; $i < (count($key) - 1); ++$i) {
-        if (!isset($d[$key[$i]])) {
-          $d[$key[$i]] = array();
-        }
-
-        $d = &$d[$key[$i]];
-      }
-
-      // Nodes containing an item named __phpredisadmin__ are also a key, not just a directory.
-      // This means that creating an actual key named __phpredisadmin__ will make this bug.
-      $d[$key[count($key) - 1]] = array('__phpredisadmin__' => true);
-
-      // Unset $d so we don't accidentally overwrite it somewhere else.
-      unset($d);
-    }
-
-    // Recursive function used to print the namespaces.
-    function print_namespace($item, $name, $fullkey, $islast) {
-      global $config, $server, $redis;
-
-      // Is this also a key and not just a namespace?
-      if (isset($item['__phpredisadmin__'])) {
-        // Unset it so we won't loop over it when printing this namespace.
-        unset($item['__phpredisadmin__']);
-
-        $class = array();
-        $len   = false;
-
-        if (isset($_GET['key']) && ($fullkey == $_GET['key'])) {
-          $class[] = 'current';
-        }
-        if ($islast) {
-          $class[] = 'last';
-        }
-
-        // Get the number of items in the key.
-        if (!isset($config['faster']) || !$config['faster']) {
-          switch ($redis->type($fullkey)) {
-            case 'hash':
-              $len = $redis->hLen($fullkey);
-              break;
-
-            case 'list':
-              $len = $redis->lLen($fullkey);
-              break;
-
-            case 'set':
-              $len = $redis->sCard($fullkey);
-              break;
-
-            case 'zset':
-              $len = $redis->zCard($fullkey);
-              break;
-          }
-        }
-
-
-        ?>
-        <li<?php echo empty($class) ? '' : ' class="'.implode(' ', $class).'"'?>>
-        <a href="?view&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>&amp;key=<?php echo urlencode($fullkey)?>"><?php echo format_html($name)?><?php if ($len !== false) { ?><span class="info">(<?php echo $len?>)</span><?php } ?></a>
-        </li>
-        <?php
-      }
-
-      // Does this namespace also contain subkeys?
-      if (count($item) > 0) {
-        ?>
-        <li class="folder<?php echo ($fullkey === '') ? '' : ' collapsed'?><?php echo $islast ? ' last' : ''?>">
-        <div class="icon"><?php echo format_html($name)?>&nbsp;<span class="info">(<?php echo count($item)?>)</span>
-        <?php if ($fullkey !== '') { ?><a href="delete.php?s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>&amp;tree=<?php echo urlencode($fullkey)?>:" class="deltree"><img src="images/delete.png" width="10" height="10" title="Delete tree" alt="[X]"></a><?php } ?>
-        </div><ul>
-        <?php
-
-        $l = count($item);
-
-        foreach ($item as $childname => $childitem) {
-          // $fullkey will be empty on the first call.
-          if ($fullkey === '') {
-            $childfullkey = $childname;
-          } else {
-            $childfullkey = $fullkey.$server['seperator'].$childname;
-          }
-
-          print_namespace($childitem, $childname, $childfullkey, (--$l == 0));
-        }
-
-        ?>
-        </ul>
-        </li>
-        <?php
-      }
-    }
-
-}  // if redis
-
-
-// This is basically the same as the click code in index.js.
-// Just build the url for the frame based on our own url.
-if (count($_GET) == 0) {
-  $iframe = 'overview.php';
-} else {
-  $iframe = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1);
-
-  if (strpos($iframe, '&') !== false) {
-    $iframe = substr_replace($iframe, '.php?', strpos($iframe, '&'), 1);
-  } else {
-    $iframe .= '.php';
-  }
-}
-
-
-
-$page['css'][] = 'index';
-$page['js'][]  = 'index';
-$page['js'][]  = 'jquery-cookie';
-
-require 'includes/header.inc.php';
-
-?>
-<div id="sidebar">
-
-<h1 class="logo"><a href="?overview&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>">phpRedisAdmin</a></h1>
-
-<p>
-<select id="server">
-<?php foreach ($config['servers'] as $i => $srv) { ?>
-<option value="<?php echo $i?>" <?php echo ($server['id'] == $i) ? 'selected="selected"' : ''?>><?php echo isset($srv['name']) ? format_html($srv['name']) : $srv['host'].':'.$srv['port']?></option>
-<?php } ?>
-</select>
-
-<?php if($redis) { ?>
-
-<?php
-if (isset($server['databases'])) {
-  $databases = $server['databases'];
-} else {
-  $databases = $redis->config('GET', 'databases');
-  $databases = $databases['databases'];
-}
-if ($databases > 1) { ?>
-  <select id="database">
-  <?php for ($d = 0; $d < $databases; ++$d) { ?>
-  <option value="<?php echo $d?>" <?php echo ($server['db'] == $d) ? 'selected="selected"' : ''?>>database <?php echo $d?></option>
-  <?php } ?>
-  </select>
-<?php } ?>
-</p>
-
-<p>
-<?php if (isset($login)) { ?>
-<a href="logout.php"><img src="images/logout.png" width="16" height="16" title="Logout" alt="[L]"></a>
-<?php } ?>
-<a href="?info&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>"><img src="images/info.png" width="16" height="16" title="Info" alt="[I]"></a>
-<a href="?export&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>"><img src="images/export.png" width="16" height="16" title="Export" alt="[E]"></a>
-<a href="?import&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>"><img src="images/import.png" width="16" height="16" title="Import" alt="[I]"></a>
-<?php if (isset($server['flush']) && $server['flush']) { ?>
-<a href="?flush&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>" id="flush"><img src="images/flush.png" width="16" height="16" title="Flush" alt="[F]"></a>
-<?php } ?>
-</p>
-
-<p>
-<a href="?edit&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>" class="add">Add another key</a>
-</p>
-
-<p>
-<input type="text" id="server_filter" size="14" value="<?php echo format_html($server['filter']); ?>" placeholder="type here to server filter" class="info">
-<button id="btn_server_filter">Filter!</button>
-</p>
-
-<p>
-<input type="text" id="filter" size="24" value="type here to filter" placeholder="type here to filter" class="info">
-</p>
-
-<div id="keys">
-<ul>
-<?php print_namespace($namespaces, 'Keys', '', empty($namespaces))?>
-</ul>
-</div><!-- #keys -->
-
-<?php } else { ?>
-</p>
-<div style="color:red">Can't connect to this server</div>
-<?php } ?>
-
-</div><!-- #sidebar -->
-
-<div id="resize"></div>
-<div id="resize-layover"></div>
-
-<div id="frame">
-<iframe src="<?php echo format_html($iframe)?>" id="iframe" frameborder="0" scrolling="0"></iframe>
-</div><!-- #frame -->
-
-<?php
-
-require 'includes/footer.inc.php';
-
-?>

+ 0 - 60
Gameserver/Public/phpRedisAdmin/info.php

@@ -1,60 +0,0 @@
-<?php
-
-require_once 'includes/common.inc.php';
-
-
-
-
-if (isset($_GET['reset']) && method_exists($redis, 'resetStat')) {
-  $redis->resetStat();
-
-  header('Location: info.php');
-  die;
-}
-
-
-
-// Fetch the info
-$info = $redis->Info_hash();
-$alt  = false;
-
-
-
-
-$page['css'][] = 'frame';
-$page['js'][]  = 'frame';
-
-require 'includes/header.inc.php';
-
-?>
-<h2>Info</h2>
-
-<?php if (method_exists($redis, 'resetStat')) { ?>
-<p>
-<a href="?reset&amp;s=<?php echo $server['id']?>&amp;d=<?php echo $server['db']?>" class="reset">Reset usage statistics</a>
-</p>
-<?php } ?>
-
-<table>
-<tr><th><div>Key</div></th><th><div>Value</div></th></tr>
-<?php
-
-foreach ($info as $key => $value) {
-  if ($key == 'allocation_stats') { // This key is very long to split it into multiple lines
-    $value = str_replace(',', ",\n", $value);
-  }
-
-  ?>
-  <tr <?php echo $alt ? 'class="alt"' : ''?>><td><div><?php echo format_html($key)?></div></td><td><pre><?php echo format_html(is_array($value) ? print_r($value, true) : $value)?></pre></td></tr>
-  <?php
-
-  $alt = !$alt;
-}
-
-?>
-</table>
-<?php
-
-require 'includes/footer.inc.php';
-
-?>

+ 0 - 29
Gameserver/Public/phpRedisAdmin/js/frame.js

@@ -1,29 +0,0 @@
-$(function() {
-  if (history.replaceState) {
-    window.parent.history.replaceState({}, '', document.location.href.replace('?', '&').replace(/([a-z]*)\.php/, '?$1'));
-  }
-
-
-  $('#type').change(function(e) {
-    $('#hkeyp' ).css('display', e.target.value == 'hash' ? 'block' : 'none');
-    $('#indexp').css('display', e.target.value == 'list' ? 'block' : 'none');
-    $('#scorep').css('display', e.target.value == 'zset' ? 'block' : 'none');
-  }).change();
-
-
-  $('.delkey, .delval').click(function(e) {
-    e.preventDefault();
-
-    if (confirm($(this).hasClass('delkey') ? 'Are you sure you want to delete this key and all it\'s values?' : 'Are you sure you want to delete this value?')) {
-      $.ajax({
-        type: "POST",
-        url: this.href,
-        data: 'post=1',
-        success: function(url) {
-          top.location.href = top.location.pathname+url;
-        }
-      });
-    }
-  });
-});
-

+ 0 - 172
Gameserver/Public/phpRedisAdmin/js/index.js

@@ -1,172 +0,0 @@
-$(function() {
-  $('#sidebar').on('click', 'a', function(e) {
-    if (e.currentTarget.className.indexOf('deltree') !== -1) {
-      e.preventDefault();
-
-      if (confirm('Are you sure you want to delete this whole tree and all it\'s keys?')) {
-        $.ajax({
-          type: "POST",
-          url: this.href,
-          data: 'post=1',
-          success: function(url) {
-            top.location.href = top.location.pathname+url;
-          }
-        });
-      }
-    } else {
-      if (e.currentTarget.href.indexOf('/?') == -1) {
-        return;
-      }
-  
-      e.preventDefault();
-  
-      var href;
-  
-      if ((e.currentTarget.href.indexOf('?') == -1) ||
-          (e.currentTarget.href.indexOf('?') == (e.currentTarget.href.length - 1))) {
-        href = 'overview.php';
-      } else {
-        href = e.currentTarget.href.substr(e.currentTarget.href.indexOf('?') + 1);
-  
-        if (href.indexOf('&') != -1) {
-          href = href.replace('&', '.php?');
-        } else {
-          href += '.php';
-        }
-      }
-  
-      if (href.indexOf('flush.php') == 0) {
-        if (confirm('Are you sure you want to delete this key and all it\'s values?')) {
-          $.ajax({
-            type: "POST",
-            url: href,
-            data: 'post=1',
-            success: function() {
-              window.location.reload();
-            }
-          });
-        }
-      } else {
-        $('#iframe').attr('src', href);
-      }
-
-      $('li.current').removeClass('current');
-      $(this).parent().addClass('current');
-    }
-  });
-
-  $('#server').change(function(e) {
-    if (location.href.indexOf('?') == -1) {
-      location.href = location.href+'?s='+e.target.value;
-    } else if (location.href.indexOf('&s=') == -1) {
-      location.href = location.href+'&s='+e.target.value;
-    } else {
-      location.href = location.href.replace(/s=[0-9]*/, 's='+e.target.value);
-    }
-  });
-
-
-  $('#database').change(function(e) {
-    if (location.href.indexOf('?') == -1) {
-      location.href = location.href+'?d='+e.target.value;
-    } else if (location.href.indexOf('&d=') == -1) {
-      location.href = location.href+'&d='+e.target.value;
-    } else {
-      location.href = location.href.replace(/d=[0-9]*/, 'd='+e.target.value);
-    }
-  });
-
-
-  $('li.current').parents('li.folder').removeClass('collapsed');
-
-  $('#sidebar').on('click', 'li.folder', function(e) {
-    var t = $(this);
-
-    if ((e.pageY >= t.offset().top) &&
-        (e.pageY <= t.offset().top + t.children('div').height())) {
-      e.stopPropagation();
-      t.toggleClass('collapsed');
-    }
-  });
-
-  $('#btn_server_filter').click(function() {
-    var filter = $('#server_filter').val();
-    location.href = top.location.pathname + '?overview&s=' + $('#server').val() + '&d=' + ($('#database').val() || '') + '&filter=' + filter;
-  });
-
-  $('#server_filter').keydown(function(e){
-    if (e.keyCode == 13) {
-      $('#btn_server_filter').click();
-    }
-  });
-
-  $('#filter').focus(function() {
-    if ($(this).hasClass('info')) {
-      $(this).removeClass('info').val('');
-    }
-  }).keyup(function() {
-    var val = $(this).val();
-
-    $('li:not(.folder)').each(function(i, el) {
-      var key = $('a', el).get(0);
-      var key = unescape(key.href.substr(key.href.indexOf('key=') + 4));
-
-      if (key.indexOf(val) == -1) {
-        $(el).addClass('hidden');
-      } else {
-        $(el).removeClass('hidden');
-      }
-    });
-
-    $('li.folder').each(function(i, el) {
-      if ($('li:not(.hidden, .folder)', el).length == 0) {
-        $(el).addClass('hidden');
-      } else {
-        $(el).removeClass('hidden');
-      }
-    });
-  });
-
-  var isResizing = false;
-  var lastDownX  = 0;
-  var lastWidth  = 0;
-
-  var resizeSidebar = function(w) {
-    $('#sidebar').css('width', w);
-    $('#keys').css('width', w);
-    $('#resize').css('left', w + 10);
-    $('#resize-layover').css('left', w + 15);
-    $('#frame').css('left', w + 15);
-  };
-
-  if (parseInt($.cookie('sidebar')) > 0) {
-    resizeSidebar(parseInt($.cookie('sidebar')));
-  }
-
-  $('#resize').on('mousedown', function (e) {
-    isResizing = true;
-    lastDownX  = e.clientX;
-    lastWidth  = $('#sidebar').width();
-    $('#resize-layover').css('z-index', 1000);
-    e.preventDefault();
-  });
-  $(document).on('mousemove', function (e) {
-    if (!isResizing) {
-      return;
-    }
-
-    var w = lastWidth - (lastDownX - e.clientX);
-    if (w < 250 ) {
-      w = 250;
-    } else if (w > 1000) {
-      w = 1000;
-    }
-
-    resizeSidebar(w);
-    $.cookie('sidebar', w);
-  }).on('mouseup', function (e) {
-    isResizing = false;
-    $('#resize-layover').css('z-index', 0);
-  });
-});
-

+ 0 - 114
Gameserver/Public/phpRedisAdmin/js/jquery-cookie.js

@@ -1,114 +0,0 @@
-/*!
- * jQuery Cookie Plugin v1.4.1
- * https://github.com/carhartl/jquery-cookie
- *
- * Copyright 2006, 2014 Klaus Hartl
- * Released under the MIT license
- */
-(function (factory) {
-  if (typeof define === 'function' && define.amd) {
-    // AMD (Register as an anonymous module)
-    define(['jquery'], factory);
-  } else if (typeof exports === 'object') {
-    // Node/CommonJS
-    module.exports = factory(require('jquery'));
-  } else {
-    // Browser globals
-    factory(jQuery);
-  }
-}(function ($) {
-
-  var pluses = /\+/g;
-
-  function encode(s) {
-    return config.raw ? s : encodeURIComponent(s);
-  }
-
-  function decode(s) {
-    return config.raw ? s : decodeURIComponent(s);
-  }
-
-  function stringifyCookieValue(value) {
-    return encode(config.json ? JSON.stringify(value) : String(value));
-  }
-
-  function parseCookieValue(s) {
-    if (s.indexOf('"') === 0) {
-      // This is a quoted cookie as according to RFC2068, unescape...
-      s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
-    }
-
-    try {
-      // Replace server-side written pluses with spaces.
-      // If we can't decode the cookie, ignore it, it's unusable.
-      // If we can't parse the cookie, ignore it, it's unusable.
-      s = decodeURIComponent(s.replace(pluses, ' '));
-      return config.json ? JSON.parse(s) : s;
-    } catch(e) {}
-  }
-
-  function read(s, converter) {
-    var value = config.raw ? s : parseCookieValue(s);
-    return $.isFunction(converter) ? converter(value) : value;
-  }
-
-  var config = $.cookie = function (key, value, options) {
-
-    // Write
-
-    if (arguments.length > 1 && !$.isFunction(value)) {
-      options = $.extend({}, config.defaults, options);
-
-      if (typeof options.expires === 'number') {
-        var days = options.expires, t = options.expires = new Date();
-        t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
-      }
-
-      return (document.cookie = [
-        encode(key), '=', stringifyCookieValue(value),
-        options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
-        options.path    ? '; path=' + options.path : '',
-        options.domain  ? '; domain=' + options.domain : '',
-        options.secure  ? '; secure' : ''
-      ].join(''));
-    }
-
-    // Read
-
-    var result = key ? undefined : {},
-      // To prevent the for loop in the first place assign an empty array
-      // in case there are no cookies at all. Also prevents odd result when
-      // calling $.cookie().
-      cookies = document.cookie ? document.cookie.split('; ') : [],
-      i = 0,
-      l = cookies.length;
-
-    for (; i < l; i++) {
-      var parts = cookies[i].split('='),
-        name = decode(parts.shift()),
-        cookie = parts.join('=');
-
-      if (key === name) {
-        // If second argument (value) is a function it's a converter...
-        result = read(cookie, value);
-        break;
-      }
-
-      // Prevent storing a cookie that we couldn't decode.
-      if (!key && (cookie = read(cookie)) !== undefined) {
-        result[name] = cookie;
-      }
-    }
-
-    return result;
-  };
-
-  config.defaults = {};
-
-  $.removeCookie = function (key, options) {
-    // Must not alter options, thus extending a fresh object...
-    $.cookie(key, '', $.extend({}, options, { expires: -1 }));
-    return !$.cookie(key);
-  };
-
-}));

File diff suppressed because it is too large
+ 0 - 1
Gameserver/Public/phpRedisAdmin/js/jquery.js


+ 0 - 40
Gameserver/Public/phpRedisAdmin/logout.php

@@ -1,40 +0,0 @@
-<?php
-
-
-$needed_parts = array(
-  'nonce'    => 1,
-  'nc'       => 1,
-  'cnonce'   => 1,
-  'qop'      => 1,
-  'username' => 1,
-  'uri'      => 1,
-  'response' => 1
- );
-
-$data = array();
-$keys = implode('|', array_keys($needed_parts));
-
-preg_match_all('/('.$keys.')=(?:([\'"])([^\2]+?)\2|([^\s,]+))/', $_SERVER['PHP_AUTH_DIGEST'], $matches, PREG_SET_ORDER);
-
-foreach ($matches as $m) {
-  $data[$m[1]] = $m[3] ? $m[3] : $m[4];
-  unset($needed_parts[$m[1]]);
-}
-
-
-if (!isset($_GET['nonce'])) {
-  header('Location: logout.php?nonce='.$data['nonce']);
-  die;
-}
-
-
-if ($data['nonce'] == $_GET['nonce']) {
-  unset($_SERVER['PHP_AUTH_DIGEST']);
-
-  require 'includes/login.inc.php';
-}
-
-
-header('Location: '.substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'logout.php')));
-
-?>

+ 0 - 103
Gameserver/Public/phpRedisAdmin/overview.php

@@ -1,103 +0,0 @@
-<?php
-require_once 'includes/common.inc.php';
-
-$info = array();
-
-foreach ($config['servers'] as $i => $server) {
-    if (!isset($server['db'])) {
-        $server['db'] = 0;
-    }
-
-    // Setup a connection to Redis.
-    if (isset($server['scheme']) && $server['scheme'] === 'unix' && $server['path']) {
-        $redis = new Predis\Client(array('scheme' => 'unix', 'path' => $server['path']));
-    } else {
-        $redis = !$server['port'] ? new Predis\Client($server['host']) : new Predis\Client('tcp://' . $server['host'] . ':' . $server['port']);
-    }
-    try {
-        $redis->connect();
-    } catch (Predis\CommunicationException $exception) {
-        $redis = false;
-    }
-
-    if (!$redis) {
-        $info[$i] = false;
-    } else {
-        if (isset($server['auth'])) {
-            if (!$redis->auth($server['auth'])) {
-                die('ERROR: Authentication failed (' . $server['host'] . ':' . $server['port'] . ')');
-            }
-        }
-        if ($server['db'] != 0) {
-            if (!$redis->select($server['db'])) {
-                die('ERROR: Selecting database failed (' . $server['host'] . ':' . $server['port'] . ',' . $server['db'] . ')');
-            }
-        }
-
-        $info[$i] = $redis->info();
-        $info[$i]['size'] = $redis->dbSize();
-
-        if (!isset($info[$i]['Server'])) {
-            $info[$i]['Server'] = array(
-                'redis_version' => $info[$i]['redis_version'],
-                'uptime_in_seconds' => $info[$i]['uptime_in_seconds']
-            );
-        }
-        if (!isset($info[$i]['Memory'])) {
-            $info[$i]['Memory'] = array(
-                'used_memory' => $info[$i]['used_memory']
-            );
-        }
-    }
-}
-
-
-
-
-$page['css'][] = 'frame';
-$page['js'][] = 'frame';
-
-require 'includes/header.inc.php';
-?>
-
-<?php foreach ($config['servers'] as $i => $server) { ?>
-    <div class="server">
-        <h2><?php echo isset($server['name']) ? format_html($server['name']) : format_html($server['host']) ?></h2>
-
-        <?php if (!$info[$i]): ?>
-            <div style="text-align:center;color:red">Server Down</div>
-        <?php else: ?>
-
-            <table>
-
-                <tr><td><div>Redis version:</div></td><td><div><?php echo $info[$i]['Server']['redis_version'] ?></div></td></tr>
-
-                <tr><td><div>Keys:</div></td><td><div><?php echo $info[$i]['size'] ?></div></td></tr>
-
-                <tr><td><div>Memory used:</div></td><td><div><?php echo format_size($info[$i]['Memory']['used_memory']) ?></div></td></tr>
-
-                <tr><td><div>Uptime:</div></td><td><div><?php echo format_ago($info[$i]['Server']['uptime_in_seconds']) ?></div></td></tr>
-
-                <tr><td><div>Last save:</div></td><td><div><?php
-                            if (isset($info[$i]['Persistence']['rdb_last_save_time'])) {
-                                echo format_ago(time() - $info[$i]['Persistence']['rdb_last_save_time'], true);
-                            } else {
-                                echo 'never';
-                            }
-                            ?> <a href="save.php?s=<?php echo $i ?>"><img src="images/save.png" width="16" height="16" title="Save Now" alt="[S]" class="imgbut"></a></div></td></tr>
-
-            </table>
-    <?php endif; ?>
-    </div>
-<?php } ?>
-
-<p class="clear">
-    <a href="https://github.com/ErikDubbelboer/phpRedisAdmin" target="_blank">phpRedisAdmin on GitHub</a>
-</p>
-
-<p>
-    <a href="http://redisdoc.com/index.html" target="_blank">Redis Documentation</a>
-</p>
-<?php
-require 'includes/footer.inc.php';
-?>

+ 0 - 17
Gameserver/Public/phpRedisAdmin/predis/.editorconfig

@@ -1,17 +0,0 @@
-# http://editorconfig.org
-
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 4
-end_of_line = lf
-insert_final_newline = true
-
-[*.php]
-trim_trailing_whitespace = true
-max_line_length = 120
-
-[*.{md,yml}]
-indent_size = 2

+ 0 - 10
Gameserver/Public/phpRedisAdmin/predis/.gitattributes

@@ -1,10 +0,0 @@
-* text=auto
-
-/tests export-ignore
-/.editorconfig export-ignore
-/.gitattributes export-ignore
-/.gitignore export-ignore
-/.php_cs export-ignore
-/.travis.yml export-ignore
-/phpunit.xml.dist export-ignore
-/phpunit.xml.travisci export-ignore

+ 0 - 9
Gameserver/Public/phpRedisAdmin/predis/.gitignore

@@ -1,9 +0,0 @@
-*.tgz
-*.phar
-.php-version
-.php_cs.cache
-phpunit.xml
-package.xml
-composer.lock
-experiments/
-vendor/

+ 0 - 34
Gameserver/Public/phpRedisAdmin/predis/.php_cs

@@ -1,34 +0,0 @@
-<?php
-
-$PREDIS_HEADER = <<<EOS
-This file is part of the Predis package.
-
-(c) Daniele Alessandri <suppakilla@gmail.com>
-
-For the full copyright and license information, please view the LICENSE
-file that was distributed with this source code.
-EOS;
-
-Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($PREDIS_HEADER);
-
-return Symfony\CS\Config\Config::create()
-    ->setUsingCache(true)
-    ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
-    ->fixers(array(
-        // Symfony
-        '-unalign_equals',
-        '-unalign_double_arrow',
-
-        // Contribs
-        'header_comment',
-        'ordered_use',
-        'phpdoc_order',
-        'long_array_syntax',
-    ))
-    ->finder(
-        Symfony\CS\Finder\DefaultFinder::create()
-            ->in(__DIR__.'/bin')
-            ->in(__DIR__.'/src')
-            ->in(__DIR__.'/tests')
-            ->in(__DIR__.'/examples')
-    );

+ 0 - 23
Gameserver/Public/phpRedisAdmin/predis/.travis.yml

@@ -1,23 +0,0 @@
-language: php
-sudo: false
-php:
-  - 5.3
-  - 5.4
-  - 5.5
-  - 5.6
-  - 7.0
-  - hhvm
-branches:
-  except:
-    - v0.5
-    - v0.6
-    - v0.6-PHP_5.2
-    - documentation
-services: redis-server
-before_script:
-  - composer self-update
-  - composer install --no-interaction --prefer-source --dev
-script:
-  - vendor/bin/phpunit -c phpunit.xml.travisci
-matrix:
-  fast_finish: true

+ 0 - 985
Gameserver/Public/phpRedisAdmin/predis/CHANGELOG.md

@@ -1,985 +0,0 @@
-v1.1.1 (2016-06-16)
-================================================================================
-
-- __FIX__: `password` and `database` from the global `parameters` client option
-  were still being applied to sentinels connections making them fail (sentinels
-  do not understand the `AUTH` and `SELECT` commands) (PR #346).
-
-- __FIX__: when a sentinel instance reports no sentinel for a service, invoking
-  `connect()` on the redis-sentinel connection backend should fall back to the
-  master connection instead of failing (ISSUE #342).
-
-- __FIX__: the two connection backends based on ext-phpiredis has some kind of
-  issues with the GC and the internal use of closures as reader callbacks that
-  prevented connections going out of scope from being properly collected and the
-  underlying stream or socket resources from being closed and freed. This should
-  not have had any actual effect in real-world scenarios due to the lifecycle of
-  PHP scripts, but we fixed it anyway (ISSUE #345).
-
-
-v1.1.0 (2016-06-02)
-================================================================================
-
-- The default server profile for the client now targets Redis 3.2.
-
-- Responses to the following commands are not casted into booleans anymore, the
-  original integer value is returned: `SETNX`, `MSETNX`, `SMOVE`, `SISMEMBER`,
-  `HSET`, `HSETNX`, `HEXISTS`, `PFADD`, `EXISTS`, `MOVE`, `PERSIST`, `EXPIRE`,
-  `EXPIREAT`, `RENAMENX`. This change does not have a significant impact unless
-  when using strict comparisons (=== and !==) the returned value.
-
-- Non-boolean string values passed to the `persistent` connection parameter can
-  be used to create different persistent connections. Note that this feature was
-  already present in Predis but required both `persistent` and `path` to be set
-  as illustrated by [#139](https://github.com/nrk/predis/pull/139). This change
-  is needed to prevent confusion with how `path` is used to select a database
-  when using the `redis` scheme.
-
-- The client throws exceptions when Redis returns any kind of error response to
-  initialization commands (the ones being automatically sent when a connection
-  is established, such as `SELECT` and `AUTH` when database and password are set
-  in connection parameters) regardless of the value of the exception option.
-
-- Using `unix:///path/to/socket` in URI strings to specify a UNIX domain socket
-  file is now deprecated in favor of the format `unix:/path/to/socket` (note the
-  lack of the double slash after the scheme) and will not be supported starting
-  with the next major release.
-
-- Implemented full support for redis-sentinel.
-
-- Implemented the ability to specify default connection parameters for aggregate
-  connections with the new `parameters` client option. These parameters augment
-  the usual user-supplied connection parameters (but do not take the precedence
-  over them) when creating new connections and they are mostly useful when the
-  client is using aggregate connections such as redis-cluster and redis-sentinel
-  as these backends can create new connections on the fly based on responses and
-  redirections from Redis.
-
-- Redis servers protected by SSL-encrypted connections can be accessed by using
-  the `tls` or `rediss` scheme in connection parameters along with SSL-specific
-  options in the `ssl` parameter (see http://php.net/manual/context.ssl.php).
-
-- `Predis\Client` implements `IteratorAggregate` making it possible to iterate
-  over traversable aggregate connections and get a new client instance for each
-  Redis node.
-
-- Iterating over an instance of `Predis\Connection\Aggregate\RedisCluster` will
-  return all the connections mapped in the slots map instead of just the ones in
-  the pool. This change makes it possible, when the slots map is retrieved from
-  Redis, to iterate over all of the master nodes in the cluster. When the use of
-  `CLUSTER SLOTS` is disabled via the `useClusterSlots()` method, the iteration
-  returns only the connections with slots ranges associated in their parameters
-  or the ones initialized by `-MOVED` responses in order to make the behaviour
-  of the iteration consistent between the two modes of operation.
-
-- Various improvements to `Predis\Connection\Aggregate\MasterSlaveReplication`
-  (the "basic" replication backend, not the new one based on redis-sentinel):
-
-  - When the client is not able to send a read-only command to a slave because
-    the current connection fails or the slave is resyncing (`-LOADING` response
-    returned by Redis), the backend discards the failed connection and performs
-    a new attempt on the next slave. When no other slave is available the master
-    server is used for read-only commands as last resort.
-
-  - It is possible to discover the current replication configuration on the fly
-    by invoking the `discover()` method which internally relies on the output of
-    the command `INFO REPLICATION` executed against the master server or one of
-    the slaves. The backend can also be configured to do this automatically when
-    it fails to reach one of the servers.
-
-  - Implemented the `switchToMaster()` and `switchToSlave()` methods to make it
-    easier to force a switch to the master server or a random slave when needed.
-
-
-v1.0.4 (2016-05-30)
-================================================================================
-
-- Added new profile for Redis 3.2 with its new commands: `HSTRLEN`, `BITFIELD`,
-  `GEOADD`, `GEOHASH`, `GEOPOS`, `GEODIST`, `GEORADIUS`, `GEORADIUSBYMEMBER`.
-  The default server profile for Predis is still the one for Redis 3.0 you must
-  set the `profile` client option to `3.2` when initializing the client in order
-  to be able to use them when connecting to Redis 3.2.
-
-- Various improvements in the handling of redis-cluster:
-
-    - If the connection to a specific node fails when executing a command, the
-      client tries to connect to another node in order to refresh the slots map
-      and perform a new attempt to execute the command.
-
-    - Connections to nodes can be preassigned to non-contiguous slot ranges via
-      the `slots` parameter using a comma separator. This is how it looks like
-      in practice: `tcp://127.0.0.1:6379?slots=0-5460,5500-5600,11000`.
-
-- __FIX__: broken values returned by `Predis\Collection\Iterator\HashKey` when
-  iterating hash keys containing integer fields (PR #330, ISSUE #331).
-
-- __FIX__: prevent failures when `Predis\Connection\StreamConnection` serializes
-  commands with holes in their arguments (e.g. `[0 => 'key:0', 2 => 'key:2']`).
-  The same fix has been applied to `Predis\Protocol\Text\RequestSerializer`.
-  (ISSUE #316).
-
-
-v1.0.3 (2015-07-30)
-================================================================================
-
-- __FIX__: the previous release introduced a severe regression on HHVM that made
-  the library unable to connect to Redis when using IPv4 addresses. Code running
-  on the standard PHP interpreter is not affected.
-
-
-v1.0.2 (2015-07-30)
-================================================================================
-
-- IPv6 is now fully supported.
-
-- Added `redis` as an accepted scheme for connection parameters. When using this
-  scheme, the rules used to parse URI strings match the provisional registration
-  [published by IANA](http://www.iana.org/assignments/uri-schemes/prov/redis).
-
-- Added new or missing commands: `HSTRLEN` (>= 3.2), `ZREVRANGEBYLEX` (>= 2.8)
-  and `MIGRATE` (>= 2.6).
-
-- Implemented support for the `ZADD` modifiers `NX|XX`, `CH`, `INCR` (Redis >=
-  3.0.2) using the simplified signature where scores and members are passed as
-  a named array.
-
-- __FIX__: `Predis\Configuration\Options` must not trigger the autoloader when
-  option values are strings (ISSUE #257).
-
-- __FIX__: `BITPOS` was not defined in the key-prefix processor (ISSUE #265) and
-  in the replication strategy.
-
-
-v1.0.1 (2015-01-02)
-================================================================================
-
-- Added `BITPOS` to the server profile for Redis 2.8.
-
-- Connection timeout for read/write operations can now be set for UNIX sockets
-  where the underlying connection uses PHP's stream.
-
-- __FIX__: broken values returned by `Predis\Collection\Iterator\SortedSetKey`
-  when iterating sorted set containing integer members (ISSUE #216).
-
-- __FIX__: applied a minor workaround for a bug in old versions of PHP < 5.3.9
-  affecting inheritance.
-
-- __FIX__: prevent E_NOTICE warnings when using INFO [section] returns an empty
-  response due to an unsupported specific set of information requested to Redis.
-
-
-v1.0.0 (2014-08-01)
-================================================================================
-
-- Switched to PSR-4 for autoloading.
-
-- The default server profile for Redis is `3.0`.
-
-- Removed server profile for Redis 1.2.
-
-- Added `SENTINEL` to the profile for Redis 2.6 and `PUBSUB` to the profile for
-  Redis 2.8.
-
-- `Predis\Client` can now send raw commands using `Predis\Client::executeRaw()`.
-
-- Status responses are returned as instances of `Predis\Response\Status`, for
-  example +OK is not returned as boolean TRUE anymore which is a breaking change
-  for those using strict comparisons. Status responses can be casted to string
-  values carrying the original payload, so one can do `$response == 'OK'` which
-  is also more akin to how Redis replies to clients.
-
-- Commands `ZRANGE`, `ZRANGEBYSCORE`, `ZREVRANGE` and `ZREVRANGEBYSCORE` using
-  `WITHSCORE` return a named array of member => score instead of using an array
-  of [member, score] elements. Insertion order is preserved anyway due to how
-  PHP works internally.
-
-- The command `ZSCAN` returns a named array of member => score instead of using
-  an array of [member, score] elements. Insertion order is preserved anyway due
-  to how PHP works internally.
-
-- The rules for redis-cluster are now leveraged for empty key tags when using
-  client-side sharding, which means that when one or the first occurrence of {}
-  is found in a key it will most likely produce a different hash than previous
-  versions of Predis thus leading to a different partitioning in these cases.
-
-- Invoking `Predis\Client::connect()` when the underlying connection has been
-  already established does not throw any exception anymore, now the connection
-  simply does not attempt to perform any operation.
-
-- Added the `aggregate` client option, useful to fully customize how the client
-  should aggregate multiple connections when an array of connection parameters
-  is passed to `Predis\Client::__construct()`.
-
-- Dropped support for streamable multibulk responses. Actually we still ship the
-  iterator response classes just in case anyone would want to build custom stuff
-  at a level lower than the client abstraction (our standard and composable text
-  protocol processors still handle them and can be used as an example).
-
-- Simplified the implementation of connection parameters by removing method used
-  to cast to int / bool / float certain parameters supplied by users. Casting
-  values, if deemed necessary, should be done by the consumer or you can just
-  subclass `Predis\Connection\Parameters` and override the `filter()` method.
-
-- Changed a couple of options for our transaction abstraction:
-
-    - `exceptions`: overrides the value of the client option with the same name.
-      Please note that it does not affect all the transaction control commands
-      such as `MULTI`, `EXEC`, `DISCARD`, `WATCH` and `UNWATCH`.
-    - `on_retry`: this option has been removed.
-
-- Removed pipeline executors, now command pipelines can be easily customized by
-  extending the standard `Predis\Pipeline\Pipeline` class. Accepted options when
-  creating a pipeline using `Predis\Client::pipeline()` are:
-
-    - `atomic`: returns a pipeline wrapped in a MULTI / EXEC transaction
-      (class: `Predis\Pipeline\Atomic`).
-    - `fire-and-forget`: returns a pipeline that does not read back responses
-      (class: `Predis\Pipeline\FireAndForget`).
-
-- Renamed the two base abstract command classes:
-
-    - `Predis\Command\AbstractCommand` is now `Predis\Command\Command`
-    - `Predis\Command\ScriptedCommand` is now `Predis\Command\ScriptCommand`
-
-- Dropped `Predis\Command\Command::__toString()` (see issue #151).
-
-- The key prefixing logic has been moved from command classes to the key prefix
-  processor. Developers can define or override handlers used to prefix keys, but
-  they can also define the needed logic in their command classes by implementing
-  `Predis\Command\PrefixableCommandInterface` just like before.
-
-- `Predis\PubSub\DispatcherLoop` now takes a `Predis\PubSub\Consumer` instance
-  as the sole argument of its constructor instead of `Predis\ClientInterface`.
-
-- All of the interfaces and classes related to translated Redis response types
-  have been moved in the new `Predis\Response` namespace and most of them have
-  been renamed to make their fully-qualified name less redundant. Now the base
-  response interface is `Predis\Response\ResponseInterface`.
-
-- Renamed interface `Predis\Command\Processor\CommandProcessorInterface` to a
-  shorter `Predis\Command\Processor\ProcessorInterface`. Also removed interface
-  for chain processors since it is basically useless.
-
-- Renamed `Predis\ExecutableContextInterface` to `Predis\ClientContextInterface`
-  and augmented it with a couple of required methods since this interface is no
-  more comparable to a basic client as it could be misleading.
-
-- The `Predis\Option` namespace is now known as `Predis\Configuration` and have
-  a fully-reworked `Options` class with the ability to lazily initialize values
-  using objects that responds to `__invoke()` (not all the kinds of callables)
-  even for custom options defined by the user.
-
-- Renamed `Predis\Connection\ConnectionInterface::writeCommand()` into
-  `writeRequest()` for consistency with its counterpart, `readResponse()`.
-
-- Renamed `Predis\Connection\SingleConnectionInterface::pushInitCommand()` into
-  `addConnectCommand()` which is more obvious.
-
-- Renamed the connection class based on both ext-phpiredis and ext-socket into
-  `Predis\Connection\PhpiredisSocketConnection`. The one based on PHP's streams
-  is still named `Predis\Connection\PhpiredisStreamConnection`.
-
-- Renamed the connection factory class to `Predis\Connection\Factory`. Now its
-  constructor does not require anymore a profile instance to create `AUTH` and
-  `SELECT` commands when parameters contain both `password` and `database`. Raw
-  commands will be used instead.
-
-- Renamed the connection parameters class to `Predis\Connection\Parameters`. Now
-  its constructor accepts only named arrays, but instances can still be created
-  using both URIs or arrays using the static method `Parameters::create()`.
-
-- The profile factory code has been extracted from the abstract Redis profile
-  class and now lives in `Predis\Profile\Factory`.
-
-- The `Predis\Connection` namespace has been completely reorganized by renaming
-  a few classes and interfaces and adding some sub-namespaces.
-
-- Most classes and interfaces in the `Predis\Protocol` namespace have been moved
-  or renamed while rationalizing the whole API for external protocol processors.
-
-
-v0.8.7 (2014-08-01)
-================================================================================
-
-- Added `3.0` in the server profiles aliases list for Redis 3.0. `2.8` is still
-  the default server profile and `dev` still targets Redis 3.0.
-
-- Added `COMMAND` to the server profile for Redis 2.8.
-
-- Switched internally to the `CLUSTER SLOTS` command instead of `CLUSTER NODES`
-  to fetch the updated slots map from redis-cluster. This change requires users
-  to upgrade Redis nodes to >= 3.0.0b7.
-
-- The updated slots map is now fetched automatically from redis-cluster upon the
-  first `-MOVED` response by default. This change makes it possible to feed the
-  client constructor with only a few nodes of the actual cluster composition,
-  without needing a more complex configuration.
-
-- Implemented support for `PING` in PUB/SUB loop for Redis >= 3.0.0b8.
-
-- The default client-side sharding strategy and the one for redis-cluster now
-  share the same implementations as they follow the same rules. One difference,
-  aside from the different hashing function used to calculate distribution, is
-  in how empty hash tags like {} are treated by redis-cluster.
-
-- __FIX__: the patch applied to fix #180 introduced a regression affecting read/
-  write timeouts in `Predis\Connection\PhpiredisStreamConnection`. Unfortunately
-  the only possible solution requires PHP 5.4+. On PHP 5.3, read/write timeouts
-  will be ignored from now on.
-
-
-v0.8.6 (2014-07-15)
-================================================================================
-
-- Redis 2.8 is now the default server profile as there are no changes that would
-  break compatibility with previous releases.
-
-- Added `PFADD`, `PFCOUNT`, `PFMERGE` to the server profile for Redis 2.8 for
-  handling the HyperLogLog data structure introduced in Redis 2.8.9.
-
-- Added `ZLEXCOUNT`, `ZRANGEBYLEX`, `ZREMRANGEBYLEX` to the server profile for
-  Redis 2.8 for handling lexicographic operations on members of sorted sets.
-
-- Added support for key hash tags when using redis-cluster (Redis 3.0.0b1).
-
-- __FIX__: minor tweaks to make Predis compatible with HHVM >= 2.4.0.
-
-- __FIX__: responses to `INFO` are now properly parsed and will not break when
-  redis sentinel is being used (ISSUE #154).
-
-- __FIX__: added missing support for `INCRBYFLOAT` in cluster and replication
-  configurations (ISSUE #159).
-
-- __FIX__: fix parsing of the output of `CLUSTER NODES` to fetch the slots map
-  from a node when redis-cluster has slaves in its configuration (ISSUE #165).
-
-- __FIX__: prevent a stack overflow when iterating over large Redis collections
-  using our abstraction for cursor-based iterators (ISSUE #182).
-
-- __FIX__: properly discards transactions when the server immediately returns an
-  error response (e.g. -OOM or -ERR on invalid arguments for a command) instead
-  of a +QUEUED response (ISSUE #187).
-
-- Upgraded to PHPUnit 4.* for the test suite.
-
-
-v0.8.5 (2014-01-16)
-================================================================================
-
-- Added `2.8` in the server profiles aliases list for Redis 2.8. `2.6` is still
-  the default server profile and `dev` now targets Redis 3.0.
-
-- Added `SCAN`, `SSCAN`, `ZSCAN`, `HSCAN` to the server profile for Redis 2.8.
-
-- Implemented PHP iterators for incremental iterations over Redis collections:
-
-    - keyspace (cursor-based iterator using `SCAN`)
-    - sets (cursor-based iterator using `SSCAN`)
-    - sorted sets (cursor-based iterator using `ZSCAN`)
-    - hashes (cursor-based iterator using `HSCAN`)
-    - lists (plain iterator using `LRANGE`)
-
-- It is now possible to execute "raw commands" using `Predis\Command\RawCommand`
-  and a variable list of command arguments. Input arguments are not filtered and
-  responses are not parsed, which means arguments must follow the signature of
-  the command as defined by Redis and complex responses are left untouched.
-
-- URI parsing for connection parameters has been improved and has slightly less
-  overhead when the number of fields in the querystring grows. New features are:
-
-    - Parsing does not break when value of a field contains one or more "=".
-    - Repeated fieldnames using [] produce an array of values.
-    - Empty or incomplete "key=value" pairs result in an empty string for "key".
-
-- Various improvements and fixes to the redis-cluster connection backend:
-
-    - __FIX__: the `ASKING` command is sent upon -ASK redirections.
-    - An updated slots-map can be fetched from nodes using the `CLUSTER NODES`
-      command. By default this is a manual operation but can be enabled to get
-      automatically done upon -MOVED redirections.
-    - It is possible to specify a common set of connection parameters that are
-      applied to connections created on the fly upon redirections to nodes not
-      part of the initial pool.
-
-- List of deprecated methods:
-
-    - `Predis\Client::multiExec()`: superseded by `Predis\Client::transaction()`
-      and to be removed in the next major release.
-    - `Predis\Client::pubSub()`: superseded by `Predis\Client::pubSubLoop()` and
-      to be removed in the next major release. This change was needed due to the
-      recently introduced `PUBSUB` command in Redis 2.8.
-
-
-v0.8.4 (2013-07-27)
-================================================================================
-
-- Added `DUMP` and `RESTORE` to the server profile for Redis 2.6.
-
-- Connection exceptions now report basic host details in their messages.
-
-- Allow `Predis\Connection\PhpiredisConnection` to use a random IP when a host
-  actually has several IPs (ISSUE #116).
-
-- __FIX__: allow `HMSET` when using a cluster of Redis nodes with client-side
-  sharding or redis-cluster (ISSUE #106).
-
-- __FIX__: set `WITHSCORES` modifer for `ZRANGE`, `ZREVRANGE`, `ZRANGEBYSCORE`
-  and `ZREVRANGEBYSCORE` only when the options array passed to these commands
-  has `WITHSCORES` set to `true` (ISSUE #107).
-
-- __FIX__: scripted commands falling back from `EVALSHA` to `EVAL` resulted in
-  PHP errors when using a prefixed client (ISSUE #109).
-
-- __FIX__: `Predis\PubSub\DispatcherLoop` now works properly when using key
-  prefixing (ISSUE #114).
-
-
-v0.8.3 (2013-02-18)
-================================================================================
-
-- Added `CLIENT SETNAME` and `CLIENT GETNAME` (ISSUE #102).
-
-- Implemented the `Predis\Connection\PhpiredisStreamConnection` class using the
-  `phpiredis` extension like `Predis\Connection\PhpiredisStreamConnection`, but
-  without requiring the `socket` extension since it relies on PHP's streams.
-
-- Added support for the TCP_NODELAY flag via the `tcp_nodelay` parameter for
-  stream-based connections, namely `Predis\Connection\StreamConnection` and
-  `Predis\Connection\PhpiredisStreamConnection` (requires PHP >= 5.4.0).
-
-- Updated the aggregated connection class for redis-cluster to work with 16384
-  hash slots instead of 4096 to reflect the recent change from redis unstable
-  ([see this commit](https://github.com/antirez/redis/commit/ebd666d)).
-
-- The constructor of `Predis\Client` now accepts a callable as first argument
-  returning `Predis\Connection\ConnectionInterface`. Users can create their
-  own self-contained strategies to create and set up the underlying connection.
-
-- Users should return `0` from `Predis\Command\ScriptedCommand::getKeysCount()`
-  instead of `FALSE` to indicate that all of the arguments of a Lua script must
-  be used to populate `ARGV[]`. This does not represent a breaking change.
-
-- The `Predis\Helpers` class has been deprecated and it will be removed in
-  future releases.
-
-
-v0.8.2 (2013-02-03)
-================================================================================
-
-- Added `Predis\Session\SessionHandler` to make it easy to store PHP sessions
-  on Redis using Predis. Please note that this class needs either PHP >= 5.4.0
-  or a polyfill for PHP's `SessionHandlerInterface`.
-
-- Added the ability to get the default value of a client option directly from
-  `Predis\Option\ClientOption` using the `getDefault()` method by passing the
-  option name or its instance.
-
-- __FIX__: the standard pipeline executor was not using the response parser
-  methods associated to commands to process raw responses (ISSUE #101).
-
-
-v0.8.1 (2013-01-19)
-================================================================================
-
-- The `connections` client option can now accept a callable object returning
-  an instance of `Predis\Connection\ConnectionFactoryInterface`.
-
-- Client options accepting callable objects as factories now pass their actual
-  instance to the callable as the second argument.
-
-- `Predis\Command\Processor\KeyPrefixProcessor` can now be directly casted to
-  string to obtain the current prefix, useful with string interpolation.
-
-- Added an optional callable argument to `Predis\Cluster\Distribution\HashRing`
-  and `Predis\Cluster\Distribution\KetamaPureRing` constructor that can be used
-  to customize how the distributor should extract the connection hash when
-  initializing the nodes distribution (ISSUE #36).
-
-- Correctly handle `TTL` and `PTTL` returning -2 on non existing keys starting
-  with Redis 2.8.
-
-- __FIX__: a missing use directive in `Predis\Transaction\MultiExecContext`
-  caused PHP errors when Redis did not return `+QUEUED` replies to commands
-  when inside a MULTI / EXEC context.
-
-- __FIX__: the `parseResponse()` method implemented for a scripted command was
-  ignored when retrying to execute a Lua script by falling back to `EVAL` after
-  a `-NOSCRIPT` error (ISSUE #94).
-
-- __FIX__: when subclassing `Predis\Client` the `getClientFor()` method returns
-  a new instance of the subclass instead of a new instance of `Predis\Client`.
-
-
-v0.8.0 (2012-10-23)
-================================================================================
-
-- The default server profile for Redis is now `2.6`.
-
-- Certain connection parameters have been renamed:
-
-  - `connection_async` is now `async_connect`
-  - `connection_timeout` is now `timeout`
-  - `connection_persistent` is now `persistent`
-
-- The `throw_errors` connection parameter has been removed and replaced by the
-  new `exceptions` client option since exceptions on `-ERR` replies returned by
-  Redis are not generated by connection classes anymore but instead are thrown
-  by the client class and other abstractions such as pipeline contexts.
-
-- Added smart support for redis-cluster (Redis v3.0) in addition to the usual
-  cluster implementation that uses client-side sharding.
-
-- Various namespaces and classes have been renamed to follow rules inspired by
-  the Symfony2 naming conventions.
-
-- The second argument of the constructor of `Predis\Client` does not accept
-  strings or instances of `Predis\Profile\ServerProfileInterface` anymore.
-  To specify a server profile you must explicitly set `profile` in the array
-  of client options.
-
-- `Predis\Command\ScriptedCommand` internally relies on `EVALSHA` instead of
-  `EVAL` thus avoiding to send Lua scripts bodies on each request. The client
-  automatically resends the command falling back to `EVAL` when Redis returns a
-  `-NOSCRIPT` error. Automatic fallback to `EVAL` does not work with pipelines,
-  inside a `MULTI / EXEC` context or with plain `EVALSHA` commands.
-
-- Complex responses are no more parsed by connection classes as they must be
-  processed by consumer classes using the handler associated to the issued
-  command. This means that executing commands directly on connections only
-  returns simple Redis types, but nothing changes when using `Predis\Client`
-  or the provided abstractions for pipelines and transactions.
-
-- Iterators for multi-bulk replies now skip the response parsing method of the
-  command that generated the response and are passed directly to user code.
-  Pipeline and transaction objects still consume automatically iterators.
-
-- Cluster and replication connections now extend a new common interface,
-  `Predis\Connection\AggregatedConnectionInterface`.
-
-- `Predis\Connection\MasterSlaveReplication` now uses an external strategy
-  class to handle the logic for checking readable / writable commands and Lua
-  scripts.
-
-- Command pipelines have been optimized for both speed and code cleanness, but
-  at the cost of bringing a breaking change in the signature of the interface
-  for pipeline executors.
-
-- Added a new pipeline executor that sends commands wrapped in a MULTI / EXEC
-  context to make the execution atomic: if a pipeline fails at a certain point
-  then the whole pipeline is discarded.
-
-- The key-hashing mechanism for commands is now handled externally and is no
-  more a competence of each command class. This change is neeeded to support
-  both client-side sharding and Redis cluster.
-
-- `Predis\Options\Option` is now abstract, see `Predis\Option\AbstractOption`.
-
-
-v0.7.3 (2012-06-01)
-================================================================================
-
-- New commands available in the Redis v2.6 profile (dev): `BITOP`, `BITCOUNT`.
-
-- When the number of keys `Predis\Commands\ScriptedCommand` is negative, Predis
-  will count from the end of the arguments list to calculate the actual number
-  of keys that will be interpreted as elements for `KEYS` by the underlying
-  `EVAL` command.
-
-- __FIX__: `examples\CustomDistributionStrategy.php` had a mistyped constructor
-  call and produced a bad distribution due to an error as pointed in ISSUE #63.
-  This bug is limited to the above mentioned example and does not affect the
-  classes implemented in the `Predis\Distribution` namespace.
-
-- __FIX__: `Predis\Commands\ServerEvalSHA::getScriptHash()` was calculating the
-  hash while it just needs to return the first argument of the command.
-
-- __FIX__: `Predis\Autoloader` has been modified to allow cascading autoloaders
-  for the `Predis` namespace.
-
-
-v0.7.2 (2012-04-01)
-================================================================================
-
-- Added `2.6` in the server profiles aliases list for the upcoming Redis 2.6.
-  `2.4` is still the default server profile. `dev` now targets Redis 2.8.
-
-- Connection instances can be serialized and unserialized using `serialize()`
-  and `unserialize()`. This is handy in certain scenarios such as client-side
-  clustering or replication to lower the overhead of initializing a connection
-  object with many sub-connections since unserializing them can be up to 5x
-  times faster.
-
-- Reworked the default autoloader to make it faster. It is also possible to
-  prepend it in PHP's autoload stack.
-
-- __FIX__: fixed parsing of the payload returned by `MONITOR` with Redis 2.6.
-
-
-v0.7.1 (2011-12-27)
-================================================================================
-
-- The PEAR channel on PearHub has been deprecated in favour of `pear.nrk.io`.
-
-- Miscellaneous minor fixes.
-
-- Added transparent support for master / slave replication configurations where
-  write operations are performed on the master server and read operations are
-  routed to one of the slaves. Please refer to ISSUE #21 for a bit of history
-  and more details about replication support in Predis.
-
-- The `profile` client option now accepts a callable object used to initialize
-  a new instance of `Predis\Profiles\IServerProfile`.
-
-- Exposed a method for MULTI / EXEC contexts that adds the ability to execute
-  instances of Redis commands against transaction objects.
-
-
-v0.7.0 (2011-12-11)
-================================================================================
-
-- Predis now adheres to the PSR-0 standard which means that there is no more a
-  single file holding all the classes of the library, but multiple files (one
-  for each class). You can use any PSR-0 compatible autoloader to load Predis
-  or just leverage the default one shipped with the library by requiring the
-  `Predis/Autoloader.php` and call `Predis\Autoloader::register()`.
-
-- The default server profile for Redis is now 2.4. The `dev` profile supports
-  all the features of Redis 2.6 (currently unstable) such as Lua scripting.
-
-- Support for long aliases (method names) for Redis commands has been dropped.
-
-- Redis 1.0 is no more supported. From now on Predis will use only the unified
-  protocol to serialize commands.
-
-- It is possible to prefix keys transparently on a client-level basis with the
-  new `prefix` client option.
-
-- An external connection factory is used to initialize new connection instances
-  and developers can now register their own connection classes using the new
-  `connections` client option.
-
-- It is possible to connect locally to Redis using UNIX domain sockets. Just
-  use `unix:///path/to/redis.sock` or a named array just like in the following
-  example: `array('scheme' => 'unix', 'path' => '/path/to/redis.sock');`.
-
-- If the `phpiredis` extension is loaded by PHP, it is now possible to use an
-  alternative connection class that leverages it to make Predis faster on many
-  cases, especially when dealing with big multibulk replies, with the the only
-  downside that persistent connections are not supported. Please refer to the
-  documentation to see how to activate this class using the new `connections`
-  client option.
-
-- Predis is capable to talk with Webdis, albeit with some limitations such as
-  the lack of pipelining and transactions, just by using the `http` scheme in
-  in the connection parameters. All is needed is PHP with the `curl` and the
-  `phpiredis` extensions loaded.
-
-- Way too many changes in the public API to make a list here, we just tried to
-  make all the Redis commands compatible with previous releases of v0.6 so that
-  you do not have to worry if you are simply using Predis as a client. Probably
-  the only breaking changes that should be mentioned here are:
-
-  - `throw_on_error` has been renamed to `throw_errors` and it is a connection
-    parameter instead of a client option, along with `iterable_multibulk`.
-
-  - `key_distribution` has been removed from the client options. To customize
-    the distribution strategy you must provide a callable object to the new
-    `cluster` client option to configure and then return a new instance of
-    `Predis\Network\IConnectionCluster`.
-
-  - `Predis\Client::create()` has been removed. Just use the constructor to set
-    up a new instance of `Predis\Client`.
-
-  - `Predis\Client::pipelineSafe()` was deprecated in Predis v0.6.1 and now has
-    finally removed. Use `Predis\Client::pipeline(array('safe' => true))`.
-
-  - `Predis\Client::rawCommand()` has been removed due to inconsistencies with
-    the underlying connection abstractions. You can still get the raw resource
-    out of a connection with `Predis\Network\IConnectionSingle::getResource()`
-    so that you can talk directly with Redis.
-
-- The `Predis\MultiBulkCommand` class has been merged into `Predis\Command` and
-  thus removed. Serialization of commands is now a competence of connections.
-
-- The `Predis\IConnection` interface has been splitted into two new interfaces:
-  `Predis\Network\IConnectionSingle` and `Predis\Network\IConnectionCluster`.
-
-- The constructor of `Predis\Client` now accepts more type of arguments such as
-  instances of `Predis\IConnectionParameters` and `Predis\Network\IConnection`.
-
-
-v0.6.6 (2011-04-01)
-================================================================================
-
-- Switched to Redis 2.2 as the default server profile (there are no changes
-  that would break compatibility with previous releases). Long command names
-  are no more supported by default but if you need them you can still require
-  `Predis_Compatibility.php` to avoid breaking compatibility.
-
-- Added a `VERSION` constant to `Predis\Client`.
-
-- Some performance improvements for multibulk replies (parsing them is about
-  16% faster than the previous version). A few core classes have been heavily
-  optimized to reduce overhead when creating new instances.
-
-- Predis now uses by default a new protocol reader, more lightweight and
-  faster than the default handler-based one. Users can revert to the old
-  protocol reader with the `reader` client option set to `composable`.
-  This client option can also accept custom reader classes implementing the
-  new `Predis\IResponseReader` interface.
-
-- Added support for connecting to Redis using UNIX domain sockets (ISSUE #25).
-
-- The `read_write_timeout` connection parameter can now be set to 0 or false
-  to disable read and write timeouts on connections. The old behaviour of -1
-  is still intact.
-
-- `ZUNIONSTORE` and `ZINTERSTORE` can accept an array to specify a list of the
-  source keys to be used to populate the destination key.
-
-- `MGET`, `SINTER`, `SUNION` and `SDIFF` can accept an array to specify a list
-  of keys. `SINTERSTORE`, `SUNIONSTORE` and `SDIFFSTORE` can also accept an
-  array to specify the list of source keys.
-
-- `SUBSCRIBE` and `PSUBSCRIBE` can accept a list of channels for subscription.
-
-- __FIX__: some client-side clean-ups for `MULTI/EXEC` were handled incorrectly
-  in a couple of corner cases (ISSUE #27).
-
-
-v0.6.5 (2011-02-12)
-================================================================================
-
-- __FIX__: due to an untested internal change introduced in v0.6.4, a wrong
-  handling of bulk reads of zero-length values was producing protocol
-  desynchronization errors (ISSUE #20).
-
-
-v0.6.4 (2011-02-12)
-================================================================================
-
-- Various performance improvements (15% ~ 25%) especially when dealing with
-  long multibulk replies or when using clustered connections.
-
-- Added the `on_retry` option to `Predis\MultiExecBlock` that can be used to
-  specify an external callback (or any callable object) that gets invoked
-  whenever a transaction is aborted by the server.
-
-- Added inline (p)subscribtion via options when initializing an instance of
-  `Predis\PubSubContext`.
-
-
-v0.6.3 (2011-01-01)
-================================================================================
-
-- New commands available in the Redis v2.2 profile (dev):
-  - Strings: `SETRANGE`, `GETRANGE`, `SETBIT`, `GETBIT`
-  - Lists  : `BRPOPLPUSH`
-
-- The abstraction for `MULTI/EXEC` transactions has been dramatically improved
-  by providing support for check-and-set (CAS) operations when using Redis >=
-  2.2. Aborted transactions can also be optionally replayed in automatic up
-  to a user-defined number of times, after which a `Predis\AbortedMultiExec`
-  exception is thrown.
-
-
-v0.6.2 (2010-11-28)
-================================================================================
-
-- Minor internal improvements and clean ups.
-
-- New commands available in the Redis v2.2 profile (dev):
-  - Strings: `STRLEN`
-  - Lists  : `LINSERT`, `RPUSHX`, `LPUSHX`
-  - ZSets  : `ZREVRANGEBYSCORE`
-  - Misc.  : `PERSIST`
-
-- WATCH also accepts a single array parameter with the keys that should be
-  monitored during a transaction.
-
-- Improved the behaviour of `Predis\MultiExecBlock` in certain corner cases.
-
-- Improved parameters checking for the SORT command.
-
-- __FIX__: the `STORE` parameter for the `SORT` command didn't work correctly
-  when using `0` as the target key (ISSUE #13).
-
-- __FIX__: the methods for `UNWATCH` and `DISCARD` do not break anymore method
-  chaining with `Predis\MultiExecBlock`.
-
-
-v0.6.1 (2010-07-11)
-================================================================================
-
-- Minor internal improvements and clean ups.
-
-- New commands available in the Redis v2.2 profile (dev):
-  - Misc.  : `WATCH`, `UNWATCH`
-
-- Optional modifiers for `ZRANGE`, `ZREVRANGE` and `ZRANGEBYSCORE` queries are
-  supported using an associative array passed as the last argument of their
-  respective methods.
-
-- The `LIMIT` modifier for `ZRANGEBYSCORE` can be specified using either:
-  - an indexed array: `array($offset, $count)`
-  - an associative array: `array('offset' => $offset, 'count' => $count)`
-
-- The method `Predis\Client::__construct()` now accepts also instances of
-  `Predis\ConnectionParameters`.
-
-- `Predis\MultiExecBlock` and `Predis\PubSubContext` now throw an exception
-  when trying to create their instances using a profile that does not
-  support the required Redis commands or when the client is connected to
-  a cluster of connections.
-
-- Various improvements to `Predis\MultiExecBlock`:
-  - fixes and more consistent behaviour across various usage cases.
-  - support for `WATCH` and `UNWATCH` when using the current development
-    profile (Redis v2.2) and aborted transactions.
-
-- New signature for `Predis\Client::multiExec()` which is now able to accept
-  an array of options for the underlying instance of `Predis\MultiExecBlock`.
-  Backwards compatibility with previous releases of Predis is ensured.
-
-- New signature for `Predis\Client::pipeline()` which is now able to accept
-  an array of options for the underlying instance of Predis\CommandPipeline.
-  Backwards compatibility with previous releases of Predis is ensured.
-  The method `Predis\Client::pipelineSafe()` is to be considered deprecated.
-
-- __FIX__: The `WEIGHT` modifier for `ZUNIONSTORE` and `ZINTERSTORE` was
-  handled incorrectly with more than two weights specified.
-
-
-v0.6.0 (2010-05-24)
-================================================================================
-
-- Switched to the new multi-bulk request protocol for all of the commands
-  in the Redis 1.2 and Redis 2.0 profiles. Inline and bulk requests are now
-  deprecated as they will be removed in future releases of Redis.
-
-- The default server profile is `2.0` (targeting Redis 2.0.x). If you are
-  using older versions of Redis, it is highly recommended that you specify
-  which server profile the client should use (e.g. `1.2` when connecting
-  to instances of Redis 1.2.x).
-
-- Support for Redis 1.0 is now optional and it is provided by requiring
-  'Predis_Compatibility.php' before creating an instance of `Predis\Client`.
-
-- New commands added to the Redis 2.0 profile since Predis 0.5.1:
-  - Strings: `SETEX`, `APPEND`, `SUBSTR`
-  - ZSets  : `ZCOUNT`, `ZRANK`, `ZUNIONSTORE`, `ZINTERSTORE`, `ZREMBYRANK`,
-             `ZREVRANK`
-  - Hashes : `HSET`, `HSETNX`, `HMSET`, `HINCRBY`, `HGET`, `HMGET`, `HDEL`,
-             `HEXISTS`, `HLEN`, `HKEYS`, `HVALS`, `HGETALL`
-  - PubSub : `PUBLISH`, `SUBSCRIBE`, `UNSUBSCRIBE`
-  - Misc.  : `DISCARD`, `CONFIG`
-
-- Introduced client-level options with the new `Predis\ClientOptions` class.
-  Options can be passed to the constructor of `Predis\Client` in its second
-  argument as an array or an instance of `Predis\ClientOptions`. For brevity's
-  sake and compatibility with older versions, the constructor still accepts
-  an instance of `Predis\RedisServerProfile` in its second argument. The
-  currently supported client options are:
-
-  - `profile` [default: `2.0` as of Predis 0.6.0]: specifies which server
-    profile to use when connecting to Redis. This option accepts an instance
-    of `Predis\RedisServerProfile` or a string that indicates the version.
-
-  - `key_distribution` [default: `Predis\Distribution\HashRing`]: specifies
-    which key distribution strategy to use to distribute keys among the
-    servers that compose a cluster. This option accepts an instance of
-    `Predis\Distribution\IDistributionStrategy` so that users can implement
-    their own key distribution strategy. `Predis\Distribution\KetamaPureRing`
-    is an alternative distribution strategy providing a pure-PHP implementation
-    of the same algorithm used by libketama.
-
-  - `throw_on_error` [default: `TRUE`]: server errors can optionally be handled
-    "silently": instead of throwing an exception, the client returns an error
-    response type.
-
-  - `iterable_multibulk` [EXPERIMENTAL - default: `FALSE`]: in addition to the
-    classic way of fetching a whole multibulk reply into an array, the client
-    can now optionally stream a multibulk reply down to the user code by using
-    PHP iterators. It is just a little bit slower, but it can save a lot of
-    memory in certain scenarios.
-
-- New parameters for connections:
-
-  - `alias` [default: not set]: every connection can now be identified by an
-    alias that is useful to get a specific connections when connected to a
-    cluster of Redis servers.
-  - `weight` [default: not set]: allows to balance keys asymmetrically across
-    multiple servers. This is useful when you have servers with different
-    amounts of memory to distribute the load of your keys accordingly.
-  - `connection_async` [default: `FALSE`]: estabilish connections to servers
-    in a non-blocking way, so that the client is not blocked while the socket
-    resource performs the actual connection.
-  - `connection_persistent` [default: `FALSE`]: the underlying socket resource
-    is left open when a script ends its lifecycle. Persistent connections can
-    lead to unpredictable or strange behaviours, so they should be used with
-    extreme care.
-
-- Introduced the `Predis\Pipeline\IPipelineExecutor` interface. Classes that
-  implements this interface are used internally by the `Predis\CommandPipeline`
-  class to change the behaviour of the pipeline when writing/reading commands
-  from one or multiple servers. Here is the list of the default executors:
-
-  - `Predis\Pipeline\StandardExecutor`: exceptions generated by server errors
-    might be thrown depending on the options passed to the client (see the
-    `throw_on_error` client option). Instead, protocol or network errors always
-    throw exceptions. This is the default executor for single and clustered
-    connections and shares the same behaviour of Predis 0.5.x.
-  - `Predis\Pipeline\SafeExecutor`: exceptions generated by server, protocol
-    or network errors are not thrown but returned in the response array as
-    instances of `Predis\ResponseError` or `Predis\CommunicationException`.
-  - `Predis\Pipeline\SafeClusterExecutor`: this executor shares the same
-    behaviour of `Predis\Pipeline\SafeExecutor` but it is geared towards
-    clustered connections.
-
-- Support for PUB/SUB is handled by the new `Predis\PubSubContext` class, which
-  could also be used to build a callback dispatcher for PUB/SUB scenarios.
-
-- When connected to a cluster of connections, it is now possible to get a
-  new `Predis\Client` instance for a single connection of the cluster by
-  passing its alias/index to the new `Predis\Client::getClientFor()` method.
-
-- `Predis\CommandPipeline` and `Predis\MultiExecBlock` return their instances
-  when invokink commands, thus allowing method chaining in pipelines and
-  multi-exec blocks.
-
-- `Predis\MultiExecBlock` can handle the new `DISCARD` command.
-
-- Connections now support float values for the `connection_timeout` parameter
-  to express timeouts with a microsecond resolution.
-
-- __FIX__: TCP connections now respect the read/write timeout parameter when
-  reading the payload of server responses. Previously, `stream_get_contents()`
-  was being used internally to read data from a connection but it looks like
-  PHP does not honour the specified timeout for socket streams when inside
-  this function.
-
-- __FIX__: The `GET` parameter for the `SORT` command now accepts also multiple
-  key patterns by passing an array of strings. (ISSUE #1).
-
-* __FIX__: Replies to the `DEL` command return the number of elements deleted
-  by the server and not 0 or 1 interpreted as a boolean response. (ISSUE #4).
-
-
-v0.5.1 (2010-01-23)
-================================================================================
-
-* `RPOPLPUSH` has been changed from bulk command to inline command in Redis
-  1.2.1, so `ListPopLastPushHead` now extends `InlineCommand`. The old behavior
-  is still available via the `ListPopLastPushHeadBulk` class so that you can
-  override the server profile if you need the old (and uncorrect) behaviour
-  when connecting to a Redis 1.2.0 instance.
-
-* Added missing support for `BGREWRITEAOF` for Redis >= 1.2.0.
-
-* Implemented a factory method for the `RedisServerProfile` class to ease the
-  creation of new server profile instances based on a version string.
-
-
-v0.5.0 (2010-01-09)
-================================================================================
-* First versioned release of Predis

+ 0 - 44
Gameserver/Public/phpRedisAdmin/predis/CONTRIBUTING.md

@@ -1,44 +0,0 @@
-## Filing bug reports ##
-
-Bugs or feature requests can be posted on the [GitHub issues](http://github.com/nrk/predis/issues)
-section of the project.
-
-When reporting bugs, in addition to the obvious description of your issue you __must__ always provide
-some essential information about your environment such as:
-
-  1. version of Predis (check the `VERSION` file or the `Predis\Client::VERSION` constant).
-  2. version of Redis (check `redis_version` returned by [`INFO`](http://redis.io/commands/info)).
-  3. version of PHP.
-  4. name and version of the operating system.
-  5. when possible, a small snippet of code that reproduces the issue.
-
-__Think about it__: we do not have a crystal ball and cannot predict things or peer into the unknown
-so please provide as much details as possible to help us isolating issues and fix them.
-
-__Never__ use GitHub issues to post generic questions about Predis! When you have questions about
-how Predis works or how it can be used, please just hop me an email and I will get back to you as
-soon as possible.
-
-
-## Contributing code ##
-
-If you want to work on Predis, it is highly recommended that you first run the test suite in order
-to check that everything is OK and report strange behaviours or bugs. When modifying Predis please
-make sure that no warnings or notices are emitted by PHP running the interpreter in your development
-environment with the `error_reporting` variable set to `E_ALL | E_STRICT`.
-
-The recommended way to contribute to Predis is to fork the project on GitHub, create topic branches
-on your newly created repository to fix bugs or add new features (possibly with tests covering your
-modifications) and then open a pull request with a description of the applied changes. Obviously you
-can use any other Git hosting provider of your preference.
-
-We always aim for consistency in our code base so you should follow basic coding rules as defined by
-[PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
-and [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
-and stick with the conventions used in Predis to name classes and interfaces. Indentation should be
-done with 4 spaces and code should be wrapped at 100 columns (please try to stay within this limit
-even if the above mentioned official coding guidelines set the soft limit to 120 columns).
-
-Please follow these [commit guidelines](http://git-scm.com/book/ch5-2.html#Commit-Guidelines) when
-committing your code to Git and always write a meaningful (not necessarily extended) description of
-your changes before opening pull requests.

+ 0 - 177
Gameserver/Public/phpRedisAdmin/predis/FAQ.md

@@ -1,177 +0,0 @@
-# Some frequently asked questions about Predis #
-________________________________________________
-
-### What is the point of Predis? ###
-
-The main point of Predis is about offering a highly customizable and extensible client for Redis,
-that can be easily extended by developers while still being reasonabily fast. With Predis you can
-swap almost any class with your own custom implementation: you can have custom connection classes,
-new distribution strategies for client-side sharding, or handlers to replace or add Redis commands.
-All of this can be achieved without messing with the source code of the library and directly in your
-own application. Given the fast pace at which Redis is developed and adds new features, this can be
-a great asset since it allows developers to add new and still missing features or commands or change
-the standard behaviour of the library without the need to break dependencies in production code (at
-least to some degree).
-
-### Does Predis support UNIX domain sockets and persistent connections? ###
-
-Yes. Obviously persistent connections actually work only when using PHP configured as a persistent
-process reused by the web server (see [PHP-FPM](http://php-fpm.org)).
-
-### Does Predis support SSL-encrypted connections? ###
-
-Yes. Encrypted connections are mostly useful when connecting to Redis instances exposed by various
-cloud hosting providers without the need to configure an SSL proxy, but you should also take into
-account the general performances degradation especially during the connect() operation when the TLS
-handshake must be performed to secure the connection. Persistent SSL-encrypted connections may help
-in that respect, but they are supported only when running on PHP >= 7.0.0.
-
-### Does Predis support transparent (de)serialization of values? ###
-
-No and it will not ever do that by default. The reason behind this decision is that serialization is
-usually something that developers prefer to customize depending on their needs and can not be easily
-generalized when using Redis because of the many possible access patterns for your data. This does
-not mean that it is impossible to have such a feature since you can leverage the extensibility of
-this library to define your own serialization-aware commands. You can find more details about how to
-do that [on this issue](http://github.com/nrk/predis/issues/29#issuecomment-1202624).
-
-### How can I force Predis to connect to Redis before sending any command? ###
-
-Explicitly connecting to Redis is usually not needed since the client initializes connections lazily
-only when they are needed. Admittedly, this behavior can be inconvenient in certain scenarios when
-you absolutely need to perform an upfront check to determine if the server is up and running and
-eventually catch exceptions on failures. Forcing the client to open the underlying connection can be
-done by invoking `Predis\Client::connect()`:
-
-```php
-$client = new Predis\Client();
-
-try {
-    $client->connect();
-} catch (Predis\Connection\ConnectionException $exception) {
-    // We could not connect to Redis! Your handling code goes here.
-}
-
-$client->info();
-```
-
-### How Predis abstracts Redis commands? ###
-
-The approach used to implement Redis commands is quite simple: by default each command follows the
-same signature as defined on the [Redis documentation](http://redis.io/commands) which makes things
-pretty easy if you already know how Redis works or you need to look up how to use certain commands.
-Alternatively, variadic commands can accept an array for keys or values (depending on the command)
-instead of a list of arguments. Commands such as [`RPUSH`](http://redis.io/commands/rpush) and
-[`HMSET`](http://redis.io/commands/hmset) are great examples:
-
-```php
-$client->rpush('my:list', 'value1', 'value2', 'value3');             // plain method arguments
-$client->rpush('my:list', ['value1', 'value2', 'value3']);           // single argument array
-
-$client->hmset('my:hash', 'field1', 'value1', 'field2', 'value2');   // plain method arguments
-$client->hmset('my:hash', ['field1'=>'value1', 'field2'=>'value2']); // single named array
-```
-
-An exception to this rule is [`SORT`](http://redis.io/commands/sort) for which modifiers are passed
-[using a named array](tests/Predis/Command/KeySortTest.php#L54-L75).
-
-
-# Speaking about performances... #
-_________________________________________________
-
-
-### Predis is a pure-PHP implementation: it can not be fast enough! ###
-
-It really depends, but most of the times the answer is: _yes, it is fast enough_. I will give you a
-couple of easy numbers with a simple test that uses a single client and is executed by PHP 5.5.6
-against a local instance of Redis 2.8 that runs under Ubuntu 13.10 on a Intel Q6600:
-
-```
-21000 SET/sec using 12 bytes for both key and value.
-21000 GET/sec while retrieving the very same values.
-0.130 seconds to fetch 30000 keys using _KEYS *_.
-```
-
-How does it compare with [__phpredis__](http://github.com/nicolasff/phpredis), a nice C extension
-providing an efficient client for Redis?
-
-```
-30100 SET/sec using 12 bytes for both key and value
-29400 GET/sec while retrieving the very same values
-0.035 seconds to fetch 30000 keys using "KEYS *"".
-```
-
-Wow __phpredis__ seems much faster! Well, we are comparing a C extension with a pure-PHP library so
-lower numbers are quite expected but there is a fundamental flaw in them: is this really how you are
-going to use Redis in your application? Are you really going to send thousands of commands using a
-for-loop on each page request using a single client instance? If so... well I guess you are probably
-doing something wrong. Also, if you need to `SET` or `GET` multiple keys you should definitely use
-commands such as `MSET` and `MGET`. You can also use pipelining to get more performances when this
-technique can be used.
-
-There is one more thing: we have tested the overhead of Predis by connecting on a localhost instance
-of Redis but how these numbers change when we hit the physical network by connecting to remote Redis
-instances?
-
-```
-Using Predis:
-3200 SET/sec using 12 bytes for both key and value
-3200 GET/sec while retrieving the very same values
-0.132 seconds to fetch 30000 keys using "KEYS *".
-
-Using phpredis:
-3500 SET/sec using 12 bytes for both key and value
-3500 GET/sec while retrieving the very same values
-0.045 seconds to fetch 30000 keys using "KEYS *".
-```
-
-There you go, you get almost the same average numbers and the reason is simple: network latency is a
-real performance killer and you cannot do (almost) anything about that. As a disclaimer, remember
-that we are measuring the overhead of client libraries implementations and the effects of network
-round-trip times, so we are not really measuring how fast Redis is. Redis shines best with thousands
-of concurrent clients doing requests! Also, actual performances should be measured according to how
-your application will use Redis.
-
-### I am convinced, but performances for multi-bulk responses are still worse ###
-
-Fair enough, but there is an option available if you need even more speed and consists on installing
-__[phpiredis](http://github.com/nrk/phpiredis)__ (note the additional _i_ in the name) and let the
-client use it. __phpiredis__ is another C extension that wraps __hiredis__ (the official C client
-library for Redis) with a thin layer exposing its features to PHP. You can then choose between two
-different connection classes:
-
-  - `Predis\Connection\PhpiredisStreamConnection` (using native PHP streams).
-  - `Predis\Connection\PhpiredisSocketConnection` (requires `ext-socket`).
-
-You will now get the benefits of a faster protocol serializer and parser just by adding a couple of
-lines of code:
-
-```php
-$client = new Predis\Client('tcp://127.0.0.1', array(
-    'connections' => array(
-        'tcp'  => 'Predis\Connection\PhpiredisStreamConnection',
-        'unix' => 'Predis\Connection\PhpiredisSocketConnection',
-    ),
-));
-```
-
-Dead simple. Nothing changes in the way you use the library in your application. So how fast is it
-our basic benchmark script now? There are not much improvements for inline or short bulk responses
-like the ones returned by `SET` and `GET`, but the speed for parsing multi-bulk responses is now on
-par with phpredis:
-
-```
-Fatching 30000 keys with _KEYS *_ using Predis paired with phpiredis::
-
-0.035 seconds from a local Redis instance
-0.047 seconds from a remote Redis instance
-```
-
-### If I need an extension to get better performances, why not using phpredis? ###
-
-Good question. Generically speaking if you need absolute uber-speed using Redis on the localhost and
-you do not care about abstractions built around some Redis features such as MULTI / EXEC, or if you
-do not need any kind of extensibility or guaranteed backwards compatibility with different versions
-of Redis (Predis currently supports from 1.2 up to 2.8 and the current development version), then
-using __phpredis__ makes absolutely sense. Otherwise, Predis is perfect for the job and by adding
-__phpiredis__ you can get a nice speed bump almost for free.

+ 0 - 22
Gameserver/Public/phpRedisAdmin/predis/LICENSE

@@ -1,22 +0,0 @@
-Copyright (c) 2009-2016 Daniele Alessandri
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 492
Gameserver/Public/phpRedisAdmin/predis/README.md

@@ -1,492 +0,0 @@
-# Predis #
-
-[![Software license][ico-license]](LICENSE)
-[![Latest stable][ico-version-stable]][link-packagist]
-[![Latest development][ico-version-dev]][link-packagist]
-[![Monthly installs][ico-downloads-monthly]][link-downloads]
-[![Build status][ico-travis]][link-travis]
-[![HHVM support][ico-hhvm]][link-hhvm]
-[![Gitter room][ico-gitter]][link-gitter]
-
-Flexible and feature-complete [Redis](http://redis.io) client for PHP >= 5.3 and HHVM >= 2.3.0.
-
-Predis does not require any additional C extension by default, but it can be optionally paired with
-[phpiredis](https://github.com/nrk/phpiredis) to lower the overhead of the serialization and parsing
-of the [Redis RESP Protocol](http://redis.io/topics/protocol). For an __experimental__ asynchronous
-implementation of the client you can refer to [Predis\Async](https://github.com/nrk/predis-async).
-
-More details about this project can be found on the [frequently asked questions](FAQ.md).
-
-
-## Main features ##
-
-- Support for different versions of Redis (from __2.0__ to __3.2__) using profiles.
-- Support for clustering using client-side sharding and pluggable keyspace distributors.
-- Support for [redis-cluster](http://redis.io/topics/cluster-tutorial) (Redis >= 3.0).
-- Support for master-slave replication setups and [redis-sentinel](http://redis.io/topics/sentinel).
-- Transparent key prefixing of keys using a customizable prefix strategy.
-- Command pipelining on both single nodes and clusters (client-side sharding only).
-- Abstraction for Redis transactions (Redis >= 2.0) and CAS operations (Redis >= 2.2).
-- Abstraction for Lua scripting (Redis >= 2.6) and automatic switching between `EVALSHA` or `EVAL`.
-- Abstraction for `SCAN`, `SSCAN`, `ZSCAN` and `HSCAN` (Redis >= 2.8) based on PHP iterators.
-- Connections are established lazily by the client upon the first command and can be persisted.
-- Connections can be established via TCP/IP (also TLS/SSL-encrypted) or UNIX domain sockets.
-- Support for [Webdis](http://webd.is) (requires both `ext-curl` and `ext-phpiredis`).
-- Support for custom connection classes for providing different network or protocol backends.
-- Flexible system for defining custom commands and profiles and override the default ones.
-
-
-## How to _install_ and use Predis ##
-
-This library can be found on [Packagist](http://packagist.org/packages/predis/predis) for an easier
-management of projects dependencies using [Composer](http://packagist.org/about-composer) or on our
-[own PEAR channel](http://pear.nrk.io) for a more traditional installation using PEAR. Ultimately,
-compressed archives of each release are [available on GitHub](https://github.com/nrk/predis/tags).
-
-
-### Loading the library ###
-
-Predis relies on the autoloading features of PHP to load its files when needed and complies with the
-[PSR-4 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md).
-Autoloading is handled automatically when dependencies are managed through Composer, but it is also
-possible to leverage its own autoloader in projects or scripts lacking any autoload facility:
-
-```php
-// Prepend a base path if Predis is not available in your "include_path".
-require 'Predis/Autoloader.php';
-
-Predis\Autoloader::register();
-```
-
-It is also possible to create a [phar](http://www.php.net/manual/en/intro.phar.php) archive directly
-from the repository by launching the `bin/create-phar` script. The generated phar already contains a
-stub defining its own autoloader, so you just need to `require()` it to start using the library.
-
-
-### Connecting to Redis ###
-
-When creating a client instance without passing any connection parameter, Predis assumes `127.0.0.1`
-and `6379` as default host and port. The default timeout for the `connect()` operation is 5 seconds:
-
-```php
-$client = new Predis\Client();
-$client->set('foo', 'bar');
-$value = $client->get('foo');
-```
-
-Connection parameters can be supplied either in the form of URI strings or named arrays. The latter
-is the preferred way to supply parameters, but URI strings can be useful when parameters are read
-from non-structured or partially-structured sources:
-
-```php
-// Parameters passed using a named array:
-$client = new Predis\Client([
-    'scheme' => 'tcp',
-    'host'   => '10.0.0.1',
-    'port'   => 6379,
-]);
-
-// Same set of parameters, passed using an URI string:
-$client = new Predis\Client('tcp://10.0.0.1:6379');
-```
-
-It is also possible to connect to local instances of Redis using UNIX domain sockets, in this case
-the parameters must use the `unix` scheme and specify a path for the socket file:
-
-```php
-$client = new Predis\Client(['scheme' => 'unix', 'path' => '/path/to/redis.sock']);
-$client = new Predis\Client('unix:/path/to/redis.sock');
-```
-
-The client can leverage TLS/SSL encryption to connect to secured remote Redis instances without the
-need to configure an SSL proxy like stunnel. This can be useful when connecting to nodes running on
-various cloud hosting providers. Encryption can be enabled with using the `tls` scheme and an array
-of suitable [options](http://php.net/manual/context.ssl.php) passed via the `ssl` parameter:
-
-```php
-// Named array of connection parameters:
-$client = new Predis\Client([
-  'scheme' => 'tls',
-  'ssl'    => ['cafile' => 'private.pem', 'verify_peer' => true],
-]
-
-// Same set of parameters, but using an URI string:
-$client = new Predis\Client('tls://127.0.0.1?ssl[cafile]=private.pem&ssl[verify_peer]=1');
-```
-
-The connection schemes [`redis`](http://www.iana.org/assignments/uri-schemes/prov/redis) (alias of
-`tcp`) and [`rediss`](http://www.iana.org/assignments/uri-schemes/prov/rediss) (alias of `tls`) are
-also supported, with the difference that URI strings containing these schemes are parsed following
-the rules described on their respective IANA provisional registration documents.
-
-The actual list of supported connection parameters can vary depending on each connection backend so
-it is recommended to refer to their specific documentation or implementation for details.
-
-When an array of connection parameters is provided, Predis automatically works in cluster mode using
-client-side sharding. Both named arrays and URI strings can be mixed when providing configurations
-for each node:
-
-```php
-$client = new Predis\Client([
-    'tcp://10.0.0.1?alias=first-node',
-    ['host' => '10.0.0.2', 'alias' => 'second-node'],
-]);
-```
-
-See the [aggregate connections](#aggregate-connections) section of this document for more details.
-
-Connections to Redis are lazy meaning that the client connects to a server only if and when needed.
-While it is recommended to let the client do its own stuff under the hood, there may be times when
-it is still desired to have control of when the connection is opened or closed: this can easily be
-achieved by invoking `$client->connect()` and `$client->disconnect()`. Please note that the effect
-of these methods on aggregate connections may differ depending on each specific implementation.
-
-
-### Client configuration ###
-
-Many aspects and behaviors of the client can be configured by passing specific client options to the
-second argument of `Predis\Client::__construct()`:
-
-```php
-$client = new Predis\Client($parameters, ['profile' => '2.8', 'prefix' => 'sample:']);
-```
-
-Options are managed using a mini DI-alike container and their values can be lazily initialized only
-when needed. The client options supported by default in Predis are:
-
-  - `profile`: specifies the profile to use to match a specific version of Redis.
-  - `prefix`: prefix string automatically applied to keys found in commands.
-  - `exceptions`: whether the client should throw or return responses upon Redis errors.
-  - `connections`: list of connection backends or a connection factory instance.
-  - `cluster`: specifies a cluster backend (`predis`, `redis` or callable object).
-  - `replication`: specifies a replication backend (`TRUE`, `sentinel` or callable object).
-  - `aggregate`: overrides `cluster` and `replication` to provide a custom connections aggregator.
-  - `parameters`: list of default connection parameters for aggregate connections.
-
-Users can also provide custom options with values or callable objects (for lazy initialization) that
-are stored in the options container for later use through the library.
-
-
-### Aggregate connections ###
-
-Aggregate connections are the foundation upon which Predis implements clustering and replication and
-they are used to group multiple connections to single Redis nodes and hide the specific logic needed
-to handle them properly depending on the context. Aggregate connections usually require an array of
-connection parameters when creating a new client instance.
-
-#### Cluster ####
-
-By default, when no specific client options are set and an array of connection parameters is passed
-to the client's constructor, Predis configures itself to work in clustering mode using a traditional
-client-side sharding approach to create a cluster of independent nodes and distribute the keyspace
-among them. This approach needs some form of external health monitoring of nodes and requires manual
-operations to rebalance the keyspace when changing its configuration by adding or removing nodes:
-
-```php
-$parameters = ['tcp://10.0.0.1', 'tcp://10.0.0.2', 'tcp://10.0.0.3'];
-
-$client = new Predis\Client($parameters);
-```
-
-Along with Redis 3.0, a new supervised and coordinated type of clustering was introduced in the form
-of [redis-cluster](http://redis.io/topics/cluster-tutorial). This kind of approach uses a different
-algorithm to distribute the keyspaces, with Redis nodes coordinating themselves by communicating via
-a gossip protocol to handle health status, rebalancing, nodes discovery and request redirection. In
-order to connect to a cluster managed by redis-cluster, the client requires a list of its nodes (not
-necessarily complete since it will automatically discover new nodes if necessary) and the `cluster`
-client options set to `redis`:
-
-```php
-$parameters = ['tcp://10.0.0.1', 'tcp://10.0.0.2', 'tcp://10.0.0.3'];
-$options    = ['cluster' => 'redis'];
-
-$client = new Predis\Client($parameters, $options);
-```
-
-#### Replication ####
-
-The client can be configured to operate in a single master / multiple slaves setup to provide better
-service availability. When using replication, Predis recognizes read-only commands and sends them to
-a random slave in order to provide some sort of load-balancing and switches to the master as soon as
-it detects a command that performs any kind of operation that would end up modifying the keyspace or
-the value of a key. Instead of raising a connection error when a slave fails, the client attempts to
-fall back to a different slave among the ones provided in the configuration.
-
-The basic configuration needed to use the client in replication mode requires one Redis server to be
-identified as the master (this can be done via connection parameters using the `alias` parameter set
-to `master`) and one or more servers acting as slaves:
-
-```php
-$parameters = ['tcp://10.0.0.1?alias=master', 'tcp://10.0.0.2', 'tcp://10.0.0.3'];
-$options    = ['replication' => true];
-
-$client = new Predis\Client($parameters, $options);
-```
-
-The above configuration has a static list of servers and relies entirely on the client's logic, but
-it is possible to rely on [`redis-sentinel`](http://redis.io/topics/sentinel) for a more robust HA
-environment with sentinel servers acting as a source of authority for clients for service discovery.
-The minimum configuration required by the client to work with redis-sentinel is a list of connection
-parameters pointing to a bunch of sentinel instances, the `replication` option set to `sentinel` and
-the `service` option set to the name of the service:
-
-```php
-$sentinels = ['tcp://10.0.0.1', 'tcp://10.0.0.2', 'tcp://10.0.0.3'];
-$options   = ['replication' => 'sentinel', 'service' => 'mymaster'];
-
-$client = new Predis\Client($sentinels, $options);
-```
-
-If the master and slave nodes are configured to require an authentication from clients, a password
-must be provided via the global `parameters` client option. This option can also be used to specify
-a different database index. The client options array would then look like this:
-
-```php
-$options = [
-    'replication' => 'sentinel',
-    'service' => 'mymaster',
-    'parameters' => [
-        'password' => $secretpassword,
-        'database' => 10,
-    ],
-];
-```
-
-While Predis is able to distinguish commands performing write and read-only operations, `EVAL` and
-`EVALSHA` represent a corner case in which the client switches to the master node because it cannot
-tell when a Lua script is safe to be executed on slaves. While this is indeed the default behavior,
-when certain Lua scripts do not perform write operations it is possible to provide an hint to tell
-the client to stick with slaves for their execution:
-
-```php
-$parameters = ['tcp://10.0.0.1?alias=master', 'tcp://10.0.0.2', 'tcp://10.0.0.3'];
-$options    = ['replication' => function () {
-    // Set scripts that won't trigger a switch from a slave to the master node.
-    $strategy = new Predis\Replication\ReplicationStrategy();
-    $strategy->setScriptReadOnly($LUA_SCRIPT);
-
-    return new Predis\Connection\Aggregate\MasterSlaveReplication($strategy);
-}];
-
-$client = new Predis\Client($parameters, $options);
-$client->eval($LUA_SCRIPT, 0);             // Sticks to slave using `eval`...
-$client->evalsha(sha1($LUA_SCRIPT), 0);    // ... and `evalsha`, too.
-```
-
-The [`examples`](examples/) directory contains a few scripts that demonstrate how the client can be
-configured and used to leverage replication in both basic and complex scenarios.
-
-
-### Command pipelines ###
-
-Pipelining can help with performances when many commands need to be sent to a server by reducing the
-latency introduced by network round-trip timings. Pipelining also works with aggregate connections.
-The client can execute the pipeline inside a callable block or return a pipeline instance with the
-ability to chain commands thanks to its fluent interface:
-
-```php
-// Executes a pipeline inside the given callable block:
-$responses = $client->pipeline(function ($pipe) {
-    for ($i = 0; $i < 1000; $i++) {
-        $pipe->set("key:$i", str_pad($i, 4, '0', 0));
-        $pipe->get("key:$i");
-    }
-});
-
-// Returns a pipeline that can be chained thanks to its fluent interface:
-$responses = $client->pipeline()->set('foo', 'bar')->get('foo')->execute();
-```
-
-
-### Transactions ###
-
-The client provides an abstraction for Redis transactions based on `MULTI` and `EXEC` with a similar
-interface to command pipelines:
-
-```php
-// Executes a transaction inside the given callable block:
-$responses = $client->transaction(function ($tx) {
-    $tx->set('foo', 'bar');
-    $tx->get('foo');
-});
-
-// Returns a transaction that can be chained thanks to its fluent interface:
-$responses = $client->transaction()->set('foo', 'bar')->get('foo')->execute();
-```
-
-This abstraction can perform check-and-set operations thanks to `WATCH` and `UNWATCH` and provides
-automatic retries of transactions aborted by Redis when `WATCH`ed keys are touched. For an example
-of a transaction using CAS you can see [the following example](examples/transaction_using_cas.php).
-
-
-### Adding new commands ###
-
-While we try to update Predis to stay up to date with all the commands available in Redis, you might
-prefer to stick with an old version of the library or provide a different way to filter arguments or
-parse responses for specific commands. To achieve that, Predis provides the ability to implement new
-command classes to define or override commands in the default server profiles used by the client:
-
-```php
-// Define a new command by extending Predis\Command\Command:
-class BrandNewRedisCommand extends Predis\Command\Command
-{
-    public function getId()
-    {
-        return 'NEWCMD';
-    }
-}
-
-// Inject your command in the current profile:
-$client = new Predis\Client();
-$client->getProfile()->defineCommand('newcmd', 'BrandNewRedisCommand');
-
-$response = $client->newcmd();
-```
-
-There is also a method to send raw commands without filtering their arguments or parsing responses.
-Users must provide the list of arguments for the command as an array, following the signatures as
-defined by the [Redis documentation for commands](http://redis.io/commands):
-
-```php
-$response = $client->executeRaw(['SET', 'foo', 'bar']);
-```
-
-
-### Script commands ###
-
-While it is possible to leverage [Lua scripting](http://redis.io/commands/eval) on Redis 2.6+ using
-directly [`EVAL`](http://redis.io/commands/eval) and [`EVALSHA`](http://redis.io/commands/evalsha),
-Predis offers script commands as an higher level abstraction built upon them to make things simple.
-Script commands can be registered in the server profile used by the client and are accessible as if
-they were plain Redis commands, but they define Lua scripts that get transmitted to the server for
-remote execution. Internally they use [`EVALSHA`](http://redis.io/commands/evalsha) by default and
-identify a script by its SHA1 hash to save bandwidth, but [`EVAL`](http://redis.io/commands/eval)
-is used as a fall back when needed:
-
-```php
-// Define a new script command by extending Predis\Command\ScriptCommand:
-class ListPushRandomValue extends Predis\Command\ScriptCommand
-{
-    public function getKeysCount()
-    {
-        return 1;
-    }
-
-    public function getScript()
-    {
-        return <<<LUA
-math.randomseed(ARGV[1])
-local rnd = tostring(math.random())
-redis.call('lpush', KEYS[1], rnd)
-return rnd
-LUA;
-    }
-}
-
-// Inject the script command in the current profile:
-$client = new Predis\Client();
-$client->getProfile()->defineCommand('lpushrand', 'ListPushRandomValue');
-
-$response = $client->lpushrand('random_values', $seed = mt_rand());
-```
-
-
-### Customizable connection backends ###
-
-Predis can use different connection backends to connect to Redis. Two of them leverage a third party
-extension such as [phpiredis](https://github.com/nrk/phpiredis) resulting in major performance gains
-especially when dealing with big multibulk responses. While one is based on PHP streams, the other
-is based on socket resources provided by `ext-socket`. Both support TCP/IP and UNIX domain sockets:
-
-```php
-$client = new Predis\Client('tcp://127.0.0.1', [
-    'connections' => [
-        'tcp'  => 'Predis\Connection\PhpiredisStreamConnection',  // PHP stream resources
-        'unix' => 'Predis\Connection\PhpiredisSocketConnection',  // ext-socket resources
-    ],
-]);
-```
-
-Developers can create their own connection classes to support whole new network backends, extend
-existing classes or provide completely different implementations. Connection classes must implement
-`Predis\Connection\NodeConnectionInterface` or extend `Predis\Connection\AbstractConnection`:
-
-```php
-class MyConnectionClass implements Predis\Connection\NodeConnectionInterface
-{
-    // Implementation goes here...
-}
-
-// Use MyConnectionClass to handle connections for the `tcp` scheme:
-$client = new Predis\Client('tcp://127.0.0.1', [
-    'connections' => ['tcp' => 'MyConnectionClass'],
-]);
-```
-
-For a more in-depth insight on how to create new connection backends you can refer to the actual
-implementation of the standard connection classes available in the `Predis\Connection` namespace.
-
-
-## Development ##
-
-
-### Reporting bugs and contributing code ###
-
-Contributions to Predis are highly appreciated either in the form of pull requests for new features,
-bug fixes, or just bug reports. We only ask you to adhere to a [basic set of rules](CONTRIBUTING.md)
-before submitting your changes or filing bugs on the issue tracker to make it easier for everyone to
-stay consistent while working on the project.
-
-
-### Test suite ###
-
-__ATTENTION__: Do not ever run the test suite shipped with Predis against instances of Redis running
-in production environments or containing data you are interested in!
-
-Predis has a comprehensive test suite covering every aspect of the library. This test suite performs
-integration tests against a running instance of Redis (>= 2.4.0 is required) to verify the correct
-behavior of the implementation of each command and automatically skips commands not defined in the
-specified Redis profile. If you do not have Redis up and running, integration tests can be disabled.
-By default the test suite is configured to execute integration tests using the profile for Redis 3.2
-(which is the current stable version of Redis) but can optionally target a Redis instance built from
-the `unstable` branch by modifying `phpunit.xml` and setting `REDIS_SERVER_VERSION` to `dev` so that
-the development server profile will be used. You can refer to [the tests README](tests/README.md)
-for more detailed information about testing Predis.
-
-Predis uses Travis CI for continuous integration and the history for past and current builds can be
-found [on its project page](http://travis-ci.org/nrk/predis).
-
-
-## Other ##
-
-
-### Project related links ###
-
-- [Source code](https://github.com/nrk/predis)
-- [Wiki](https://wiki.github.com/nrk/predis)
-- [Issue tracker](https://github.com/nrk/predis/issues)
-- [PEAR channel](http://pear.nrk.io)
-
-
-### Author ###
-
-- [Daniele Alessandri](mailto:suppakilla@gmail.com) ([twitter](http://twitter.com/JoL1hAHN))
-
-
-### License ###
-
-The code for Predis is distributed under the terms of the MIT license (see [LICENSE](LICENSE)).
-
-[ico-license]: https://img.shields.io/github/license/nrk/predis.svg?style=flat-square
-[ico-version-stable]: https://img.shields.io/packagist/v/predis/predis.svg?style=flat-square
-[ico-version-dev]: https://img.shields.io/packagist/vpre/predis/predis.svg?style=flat-square
-[ico-downloads-monthly]: https://img.shields.io/packagist/dm/predis/predis.svg?style=flat-square
-[ico-travis]: https://img.shields.io/travis/nrk/predis.svg?style=flat-square
-[ico-hhvm]: https://img.shields.io/hhvm/predis/predis.svg?style=flat-square
-[ico-gitter]: https://img.shields.io/gitter/room/nrk/predis.svg?style=flat-square
-
-[link-packagist]: https://packagist.org/packages/predis/predis
-[link-travis]: https://travis-ci.org/nrk/predis
-[link-downloads]: https://packagist.org/packages/predis/predis/stats
-[link-hhvm]: http://hhvm.h4cc.de/package/predis/predis
-[link-gitter]: https://gitter.im/nrk/predis

+ 0 - 1
Gameserver/Public/phpRedisAdmin/predis/VERSION

@@ -1 +0,0 @@
-1.1.2-dev

+ 0 - 14
Gameserver/Public/phpRedisAdmin/predis/autoload.php

@@ -1,14 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/src/Autoloader.php';
-
-Predis\Autoloader::register();

+ 0 - 31
Gameserver/Public/phpRedisAdmin/predis/composer.json

@@ -1,31 +0,0 @@
-{
-    "name": "predis/predis",
-    "type": "library",
-    "description": "Flexible and feature-complete Redis client for PHP and HHVM",
-    "keywords": ["nosql", "redis", "predis"],
-    "homepage": "http://github.com/nrk/predis",
-    "license": "MIT",
-    "support": {
-        "issues": "https://github.com/nrk/predis/issues"
-    },
-    "authors": [
-        {
-            "name": "Daniele Alessandri",
-            "email": "suppakilla@gmail.com",
-            "homepage": "http://clorophilla.net"
-        }
-    ],
-    "require": {
-        "php": ">=5.3.9"
-    },
-    "require-dev": {
-        "phpunit/phpunit": "~4.8"
-    },
-    "suggest": {
-        "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol",
-        "ext-curl": "Allows access to Webdis when paired with phpiredis"
-    },
-    "autoload": {
-        "psr-4": {"Predis\\": "src/"}
-    }
-}

+ 0 - 117
Gameserver/Public/phpRedisAdmin/predis/examples/custom_cluster_distributor.php

@@ -1,117 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// Developers can implement Predis\Distribution\DistributorInterface to create
-// their own distributors used by the client to distribute keys among a cluster
-// of servers.
-
-use Predis\Cluster\Distributor\DistributorInterface;
-use Predis\Cluster\Hash\HashGeneratorInterface;
-use Predis\Cluster\PredisStrategy;
-use Predis\Connection\Aggregate\PredisCluster;
-
-class NaiveDistributor implements DistributorInterface, HashGeneratorInterface
-{
-    private $nodes;
-    private $nodesCount;
-
-    public function __construct()
-    {
-        $this->nodes = array();
-        $this->nodesCount = 0;
-    }
-
-    public function add($node, $weight = null)
-    {
-        $this->nodes[] = $node;
-        ++$this->nodesCount;
-    }
-
-    public function remove($node)
-    {
-        $this->nodes = array_filter($this->nodes, function ($n) use ($node) {
-            return $n !== $node;
-        });
-
-        $this->nodesCount = count($this->nodes);
-    }
-
-    public function getSlot($hash)
-    {
-        return $this->nodesCount > 1 ? abs($hash % $this->nodesCount) : 0;
-    }
-
-    public function getBySlot($slot)
-    {
-        return isset($this->nodes[$slot]) ? $this->nodes[$slot] : null;
-    }
-
-    public function getByHash($hash)
-    {
-        if (!$this->nodesCount) {
-            throw new RuntimeException('No connections.');
-        }
-
-        $slot = $this->getSlot($hash);
-        $node = $this->getBySlot($slot);
-
-        return $node;
-    }
-
-    public function get($value)
-    {
-        $hash = $this->hash($value);
-        $node = $this->getByHash($hash);
-
-        return $node;
-    }
-
-    public function hash($value)
-    {
-        return crc32($value);
-    }
-
-    public function getHashGenerator()
-    {
-        return $this;
-    }
-}
-
-$options = array(
-    'cluster' => function () {
-        $distributor = new NaiveDistributor();
-        $strategy = new PredisStrategy($distributor);
-        $cluster = new PredisCluster($strategy);
-
-        return $cluster;
-    },
-);
-
-$client = new Predis\Client($multiple_servers, $options);
-
-for ($i = 0; $i < 100; ++$i) {
-    $client->set("key:$i", str_pad($i, 4, '0', 0));
-    $client->get("key:$i");
-}
-
-$server1 = $client->getClientFor('first')->info();
-$server2 = $client->getClientFor('second')->info();
-
-if (isset($server1['Keyspace'], $server2['Keyspace'])) {
-    $server1 = $server1['Keyspace'];
-    $server2 = $server2['Keyspace'];
-}
-
-printf("Server '%s' has %d keys while server '%s' has %d keys.\n",
-    'first', $server1['db15']['keys'], 'second', $server2['db15']['keys']
-);

+ 0 - 92
Gameserver/Public/phpRedisAdmin/predis/examples/debuggable_connection.php

@@ -1,92 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// This is an example of how you can easily extend an existing connection class
-// and trace the execution of commands for debugging purposes. This can be quite
-// useful as a starting poing to understand how your application interacts with
-// Redis.
-
-use Predis\Command\CommandInterface;
-use Predis\Connection\StreamConnection;
-
-class SimpleDebuggableConnection extends StreamConnection
-{
-    private $tstart = 0;
-    private $debugBuffer = array();
-
-    public function connect()
-    {
-        $this->tstart = microtime(true);
-
-        parent::connect();
-    }
-
-    private function storeDebug(CommandInterface $command, $direction)
-    {
-        $firtsArg = $command->getArgument(0);
-        $timestamp = round(microtime(true) - $this->tstart, 4);
-
-        $debug = $command->getId();
-        $debug .= isset($firtsArg) ? " $firtsArg " : ' ';
-        $debug .= "$direction $this";
-        $debug .= " [{$timestamp}s]";
-
-        $this->debugBuffer[] = $debug;
-    }
-
-    public function writeRequest(CommandInterface $command)
-    {
-        parent::writeRequest($command);
-
-        $this->storeDebug($command, '->');
-    }
-
-    public function readResponse(CommandInterface $command)
-    {
-        $response = parent::readResponse($command);
-        $this->storeDebug($command, '<-');
-
-        return $response;
-    }
-
-    public function getDebugBuffer()
-    {
-        return $this->debugBuffer;
-    }
-}
-
-$options = array(
-    'connections' => array(
-        'tcp' => 'SimpleDebuggableConnection',
-    ),
-);
-
-$client = new Predis\Client($single_server, $options);
-$client->set('foo', 'bar');
-$client->get('foo');
-$client->info();
-
-var_export($client->getConnection()->getDebugBuffer());
-
-/* OUTPUT:
-array (
-  0 => 'SELECT 15 -> 127.0.0.1:6379 [0.0008s]',
-  1 => 'SELECT 15 <- 127.0.0.1:6379 [0.001s]',
-  2 => 'SET foo -> 127.0.0.1:6379 [0.001s]',
-  3 => 'SET foo <- 127.0.0.1:6379 [0.0011s]',
-  4 => 'GET foo -> 127.0.0.1:6379 [0.0013s]',
-  5 => 'GET foo <- 127.0.0.1:6379 [0.0015s]',
-  6 => 'INFO -> 127.0.0.1:6379 [0.0019s]',
-  7 => 'INFO <- 127.0.0.1:6379 [0.0022s]',
-)
-*/

+ 0 - 79
Gameserver/Public/phpRedisAdmin/predis/examples/dispatcher_loop.php

@@ -1,79 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// This is a basic example on how to use the Predis\DispatcherLoop class.
-//
-// To see this example in action you can just use redis-cli and publish some
-// messages to the 'events' and 'control' channel, e.g.:
-
-// ./redis-cli
-// PUBLISH events first
-// PUBLISH events second
-// PUBLISH events third
-// PUBLISH control terminate_dispatcher
-
-// Create a client and disable r/w timeout on the socket
-$client = new Predis\Client($single_server + array('read_write_timeout' => 0));
-
-// Return an initialized PubSub consumer instance from the client.
-$pubsub = $client->pubSubLoop();
-
-// Create a dispatcher loop instance and attach a bunch of callbacks.
-$dispatcher = new Predis\PubSub\DispatcherLoop($pubsub);
-
-// Demonstrate how to use a callable class as a callback for the dispatcher loop.
-class EventsListener implements Countable
-{
-    private $events;
-
-    public function __construct()
-    {
-        $this->events = array();
-    }
-
-    public function count()
-    {
-        return count($this->events);
-    }
-
-    public function getEvents()
-    {
-        return $this->events;
-    }
-
-    public function __invoke($payload)
-    {
-        $this->events[] = $payload;
-    }
-}
-
-// Attach our callable class to the dispatcher.
-$dispatcher->attachCallback('events', ($events = new EventsListener()));
-
-// Attach a function to control the dispatcher loop termination with a message.
-$dispatcher->attachCallback('control', function ($payload) use ($dispatcher) {
-    if ($payload === 'terminate_dispatcher') {
-        $dispatcher->stop();
-    }
-});
-
-// Run the dispatcher loop until the callback attached to the 'control' channel
-// receives 'terminate_dispatcher' as a message.
-$dispatcher->run();
-
-// Display our achievements!
-echo "We received {$events->count()} messages!", PHP_EOL;
-
-// Say goodbye :-)
-$version = redis_version($client->info());
-echo "Goodbye from Redis $version!", PHP_EOL;

+ 0 - 57
Gameserver/Public/phpRedisAdmin/predis/examples/executing_redis_commands.php

@@ -1,57 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-$client = new Predis\Client($single_server);
-
-// Plain old SET and GET example...
-$client->set('library', 'predis');
-$response = $client->get('library');
-
-var_export($response); echo PHP_EOL;
-/* OUTPUT: 'predis' */
-
-// Redis has the MSET and MGET commands to set or get multiple keys in one go,
-// cases like this Predis accepts arguments for variadic commands both as a list
-// of arguments or an array containing all of the keys and/or values.
-$mkv = array(
-    'uid:0001' => '1st user',
-    'uid:0002' => '2nd user',
-    'uid:0003' => '3rd user',
-);
-
-$client->mset($mkv);
-$response = $client->mget(array_keys($mkv));
-
-var_export($response); echo PHP_EOL;
-/* OUTPUT:
-array (
-  0 => '1st user',
-  1 => '2nd user',
-  2 => '3rd user',
-) */
-
-// Predis can also send "raw" commands to Redis. The difference between sending
-// commands to Redis the usual way and the "raw" way is that in the latter case
-// their arguments are not filtered nor responses coming from Redis are parsed.
-
-$response = $client->executeRaw(array(
-    'MGET', 'uid:0001', 'uid:0002', 'uid:0003',
-));
-
-var_export($response); echo PHP_EOL;
-/* OUTPUT:
-array (
-  0 => '1st user',
-  1 => '2nd user',
-  2 => '3rd user',
-) */

+ 0 - 36
Gameserver/Public/phpRedisAdmin/predis/examples/key_prefixing.php

@@ -1,36 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// Predis can prefix keys found in commands arguments before sending commands to
-// Redis, even for complex commands such as SORT, ZUNIONSTORE and ZINTERSTORE.
-// Prefixing keys can be useful to create user-level namespaces for you keyspace
-// thus reducing the need for separate logical databases in certain scenarios.
-
-$client = new Predis\Client($single_server, array('prefix' => 'nrk:'));
-
-$client->mset(array('foo' => 'bar', 'lol' => 'wut'));
-var_export($client->mget('foo', 'lol'));
-/*
-array (
-  0 => 'bar',
-  1 => 'wut',
-)
-*/
-
-var_export($client->keys('*'));
-/*
-array (
-  0 => 'nrk:foo',
-  1 => 'nrk:lol',
-)
-*/

+ 0 - 71
Gameserver/Public/phpRedisAdmin/predis/examples/lua_scripting_abstraction.php

@@ -1,71 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// This example will not work with versions of Redis < 2.6.
-//
-// Additionally to the EVAL command defined in the current development profile,
-// the Predis\Command\ScriptCommand class can be used to build an higher level
-// abstraction for "scriptable" commands so that they will appear just like any
-// other command on the client-side. This is a quick example used to implement
-// INCREX.
-
-use Predis\Command\ScriptCommand;
-
-class IncrementExistingKeysBy extends ScriptCommand
-{
-    public function getKeysCount()
-    {
-        // Tell Predis to use all the arguments but the last one as arguments
-        // for KEYS. The last one will be used to populate ARGV.
-        return -1;
-    }
-
-    public function getScript()
-    {
-        return <<<LUA
-local cmd, insert = redis.call, table.insert
-local increment, results = ARGV[1], { }
-
-for idx, key in ipairs(KEYS) do
-  if cmd('exists', key) == 1 then
-    insert(results, idx, cmd('incrby', key, increment))
-  else
-    insert(results, idx, false)
-  end
-end
-
-return results
-LUA;
-    }
-}
-
-$client = new Predis\Client($single_server, array(
-    'profile' => function ($options) {
-        $profile = $options->getDefault('profile');
-        $profile->defineCommand('increxby', 'IncrementExistingKeysBy');
-
-        return $profile;
-    },
-));
-
-$client->mset('foo', 10, 'foobar', 100);
-
-var_export($client->increxby('foo', 'foofoo', 'foobar', 50));
-
-/*
-array (
-  0 => 60,
-  1 => NULL,
-  2 => 150,
-)
-*/

+ 0 - 44
Gameserver/Public/phpRedisAdmin/predis/examples/monitor_consumer.php

@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// This is a basic example on how to use the Predis\Monitor\Consumer class. You
-// can use redis-cli to send commands to the same Redis instance your client is
-// connected to, and then type "ECHO QUIT_MONITOR" in redis-cli when you want to
-// exit the monitor loop and terminate this script in a graceful way.
-
-// Create a client and disable r/w timeout on the socket.
-$client = new Predis\Client($single_server + array('read_write_timeout' => 0));
-
-// Use only one instance of DateTime, we will update the timestamp later.
-$timestamp = new DateTime();
-
-foreach (($monitor = $client->monitor()) as $event) {
-    $timestamp->setTimestamp((int) $event->timestamp);
-
-    // If we notice a ECHO command with the message QUIT_MONITOR, we stop the
-    // monitor consumer and then break the loop.
-    if ($event->command === 'ECHO' && $event->arguments === '"QUIT_MONITOR"') {
-        echo 'Exiting the monitor loop...', PHP_EOL;
-        $monitor->stop();
-        break;
-    }
-
-    echo "* Received {$event->command} on DB {$event->database} at {$timestamp->format(DateTime::W3C)}", PHP_EOL;
-    if (isset($event->arguments)) {
-        echo "    Arguments: {$event->arguments}", PHP_EOL;
-    }
-}
-
-// Say goodbye :-)
-$version = redis_version($client->info());
-echo "Goodbye from Redis $version!", PHP_EOL;

+ 0 - 45
Gameserver/Public/phpRedisAdmin/predis/examples/pipelining_commands.php

@@ -1,45 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// When you have a whole set of consecutive commands to send to a redis server,
-// you can use a pipeline to dramatically improve performances. Pipelines can
-// greatly reduce the effects of network round-trips.
-
-$client = new Predis\Client($single_server);
-
-$responses = $client->pipeline(function ($pipe) {
-    $pipe->flushdb();
-    $pipe->incrby('counter', 10);
-    $pipe->incrby('counter', 30);
-    $pipe->exists('counter');
-    $pipe->get('counter');
-    $pipe->mget('does_not_exist', 'counter');
-});
-
-var_export($responses);
-
-/* OUTPUT:
-array (
-  0 => Predis\Response\Status::__set_state(array(
-    'payload' => 'OK',
-  )),
-  1 => 10,
-  2 => 40,
-  3 => true,
-  4 => '40',
-  5 => array (
-    0 => NULL,
-    1 => '40',
-  ),
-)
-*/

+ 0 - 59
Gameserver/Public/phpRedisAdmin/predis/examples/pubsub_consumer.php

@@ -1,59 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// Starting from Redis 2.0 clients can subscribe and listen for events published
-// on certain channels using a Publish/Subscribe (PUB/SUB) approach.
-
-// Create a client and disable r/w timeout on the socket
-$client = new Predis\Client($single_server + array('read_write_timeout' => 0));
-
-// Initialize a new pubsub consumer.
-$pubsub = $client->pubSubLoop();
-
-// Subscribe to your channels
-$pubsub->subscribe('control_channel', 'notifications');
-
-// Start processing the pubsup messages. Open a terminal and use redis-cli
-// to push messages to the channels. Examples:
-//   ./redis-cli PUBLISH notifications "this is a test"
-//   ./redis-cli PUBLISH control_channel quit_loop
-foreach ($pubsub as $message) {
-    switch ($message->kind) {
-        case 'subscribe':
-            echo "Subscribed to {$message->channel}", PHP_EOL;
-            break;
-
-        case 'message':
-            if ($message->channel == 'control_channel') {
-                if ($message->payload == 'quit_loop') {
-                    echo 'Aborting pubsub loop...', PHP_EOL;
-                    $pubsub->unsubscribe();
-                } else {
-                    echo "Received an unrecognized command: {$message->payload}.", PHP_EOL;
-                }
-            } else {
-                echo "Received the following message from {$message->channel}:",
-                     PHP_EOL, "  {$message->payload}", PHP_EOL, PHP_EOL;
-            }
-            break;
-    }
-}
-
-// Always unset the pubsub consumer instance when you are done! The
-// class destructor will take care of cleanups and prevent protocol
-// desynchronizations between the client and the server.
-unset($pubsub);
-
-// Say goodbye :-)
-$version = redis_version($client->info());
-echo "Goodbye from Redis $version!", PHP_EOL;

+ 0 - 99
Gameserver/Public/phpRedisAdmin/predis/examples/redis_collections_iterators.php

@@ -1,99 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-use Predis\Collection\Iterator;
-
-// Starting from Redis 2.8, clients can iterate incrementally over collections
-// without blocking the server like it happens when a command such as KEYS is
-// executed on a Redis instance storing millions of keys. These commands are:
-//
-//   - SCAN (iterates over the keyspace)
-//   - SSCAN (iterates over members of a set)
-//   - ZSCAN (iterates over members and ranks of a sorted set)
-//   - HSCAN (iterates over fields and values of an hash).
-
-// Predis provides a specialized abstraction for each command based on standard
-// SPL iterators making it possible to easily consume SCAN-based iterations in
-// your PHP code.
-//
-// See http://redis.io/commands/scan for more details.
-//
-
-// Create a client using `2.8` as a server profile (needs Redis 2.8!)
-$client = new Predis\Client($single_server, array('profile' => '2.8'));
-
-// Prepare some keys for our example
-$client->del('predis:set', 'predis:zset', 'predis:hash');
-for ($i = 0; $i < 5; ++$i) {
-    $client->sadd('predis:set', "member:$i");
-    $client->zadd('predis:zset', -$i, "member:$i");
-    $client->hset('predis:hash', "field:$i", "value:$i");
-}
-
-// === Keyspace iterator based on SCAN ===
-echo 'Scan the keyspace matching only our prefixed keys:', PHP_EOL;
-foreach (new Iterator\Keyspace($client, 'predis:*') as $key) {
-    echo " - $key", PHP_EOL;
-}
-
-/* OUTPUT
-Scan the keyspace matching only our prefixed keys:
- - predis:zset
- - predis:set
- - predis:hash
-*/
-
-// === Set iterator based on SSCAN ===
-echo 'Scan members of `predis:set`:', PHP_EOL;
-foreach (new Iterator\SetKey($client, 'predis:set') as $member) {
-    echo " - $member", PHP_EOL;
-}
-
-/* OUTPUT
-Scan members of `predis:set`:
- - member:1
- - member:4
- - member:0
- - member:3
- - member:2
-*/
-
-// === Sorted set iterator based on ZSCAN ===
-echo 'Scan members and ranks of `predis:zset`:', PHP_EOL;
-foreach (new Iterator\SortedSetKey($client, 'predis:zset') as $member => $rank) {
-    echo " - $member [rank: $rank]", PHP_EOL;
-}
-
-/* OUTPUT
-Scan members and ranks of `predis:zset`:
- - member:4 [rank: -4]
- - member:3 [rank: -3]
- - member:2 [rank: -2]
- - member:1 [rank: -1]
- - member:0 [rank: 0]
-*/
-
-// === Hash iterator based on HSCAN ===
-echo 'Scan fields and values of `predis:hash`:', PHP_EOL;
-foreach (new Iterator\HashKey($client, 'predis:hash') as $field => $value) {
-    echo " - $field => $value", PHP_EOL;
-}
-
-/* OUTPUT
-Scan fields and values of `predis:hash`:
- - field:0 => value:0
- - field:1 => value:1
- - field:2 => value:2
- - field:3 => value:3
- - field:4 => value:4
-*/

+ 0 - 85
Gameserver/Public/phpRedisAdmin/predis/examples/replication_complex.php

@@ -1,85 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// Predis allows to set Lua scripts as read-only operations for replication.
-// This works for both EVAL and EVALSHA and also for the client-side abstraction
-// built upon them (Predis\Command\ScriptCommand). This example shows a slightly
-// more complex configuration that injects a new script command in the server
-// profile used by the new client instance and marks it marks it as a read-only
-// operation for replication so that it will be executed on slaves.
-
-use Predis\Command\ScriptCommand;
-use Predis\Connection\Aggregate\MasterSlaveReplication;
-use Predis\Replication\ReplicationStrategy;
-
-// ------------------------------------------------------------------------- //
-
-// Define a new script command that returns all the fields of a variable number
-// of hashes with a single roundtrip.
-
-class HashMultipleGetAll extends ScriptCommand
-{
-    const BODY = <<<LUA
-local hashes = {}
-for _, key in pairs(KEYS) do
-    table.insert(hashes, key)
-    table.insert(hashes, redis.call('hgetall', key))
-end
-return hashes
-LUA;
-
-    public function getScript()
-    {
-        return self::BODY;
-    }
-}
-
-// ------------------------------------------------------------------------- //
-
-$parameters = array(
-    'tcp://127.0.0.1:6379/?alias=master',
-    'tcp://127.0.0.1:6380/?alias=slave',
-);
-
-$options = array(
-    'profile' => function ($options, $option) {
-        $profile = $options->getDefault($option);
-        $profile->defineCommand('hmgetall', 'HashMultipleGetAll');
-
-        return $profile;
-    },
-    'replication' => function () {
-        $strategy = new ReplicationStrategy();
-        $strategy->setScriptReadOnly(HashMultipleGetAll::BODY);
-
-        $replication = new MasterSlaveReplication($strategy);
-
-        return $replication;
-    },
-);
-
-// ------------------------------------------------------------------------- //
-
-$client = new Predis\Client($parameters, $options);
-
-// Execute the following commands on the master server using redis-cli:
-// $ ./redis-cli HMSET metavars foo bar hoge piyo
-// $ ./redis-cli HMSET servers master host1 slave host2
-
-$hashes = $client->hmgetall('metavars', 'servers');
-
-$replication = $client->getConnection();
-$stillOnSlave = $replication->getCurrent() === $replication->getConnectionById('slave');
-
-echo 'Is still on slave? ', $stillOnSlave ? 'YES!' : 'NO!', PHP_EOL;
-var_export($hashes);

+ 0 - 58
Gameserver/Public/phpRedisAdmin/predis/examples/replication_sentinel.php

@@ -1,58 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// Predis supports redis-sentinel to provide high availability in master / slave
-// scenarios. The only but relevant difference with a basic replication scenario
-// is that sentinel servers can manage the master server and its slaves based on
-// their state, which means that they are able to provide an authoritative and
-// updated configuration to clients thus avoiding static configurations for the
-// replication servers and their roles.
-
-// Instead of connection parameters pointing to redis nodes, we provide a list
-// of instances of redis-sentinel. Users should always provide a timeout value
-// low enough to not hinder operations just in case a sentinel is unreachable
-// but Predis uses a default value of 100 milliseconds for sentinel parameters
-// without an explicit timeout value.
-//
-// NOTE: in real-world scenarios sentinels should be running on different hosts!
-$sentinels = array(
-    'tcp://127.0.0.1:5380?timeout=0.100',
-    'tcp://127.0.0.1:5381?timeout=0.100',
-    'tcp://127.0.0.1:5382?timeout=0.100',
-);
-
-$client = new Predis\Client($sentinels, array(
-    'replication' => 'sentinel',
-    'service' => 'mymaster',
-));
-
-// Read operation.
-$exists = $client->exists('foo') ? 'yes' : 'no';
-$current = $client->getConnection()->getCurrent()->getParameters();
-echo "Does 'foo' exist on {$current->alias}? $exists.", PHP_EOL;
-
-// Write operation.
-$client->set('foo', 'bar');
-$current = $client->getConnection()->getCurrent()->getParameters();
-echo "Now 'foo' has been set to 'bar' on {$current->alias}!", PHP_EOL;
-
-// Read operation.
-$bar = $client->get('foo');
-$current = $client->getConnection()->getCurrent()->getParameters();
-echo "We fetched 'foo' from {$current->alias} and its value is '$bar'.", PHP_EOL;
-
-/* OUTPUT:
-Does 'foo' exist on slave-127.0.0.1:6381? yes.
-Now 'foo' has been set to 'bar' on master!
-We fetched 'foo' from master and its value is 'bar'.
-*/

+ 0 - 52
Gameserver/Public/phpRedisAdmin/predis/examples/replication_simple.php

@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// Predis supports master / slave replication scenarios where write operations
-// are performed on the master server and read operations are executed against
-// one of the slaves. The behavior of commands or EVAL scripts can be customized
-// at will. As soon as a write operation is performed the client switches to the
-// master server for all the subsequent requests (either reads and writes).
-//
-// This example must be executed using the second Redis server configured as the
-// slave of the first one (see the "SLAVEOF" command).
-//
-
-$parameters = array(
-    'tcp://127.0.0.1:6379?database=15&alias=master',
-    'tcp://127.0.0.1:6380?database=15&alias=slave',
-);
-
-$options = array('replication' => true);
-
-$client = new Predis\Client($parameters, $options);
-
-// Read operation.
-$exists = $client->exists('foo') ? 'yes' : 'no';
-$current = $client->getConnection()->getCurrent()->getParameters();
-echo "Does 'foo' exist on {$current->alias}? $exists.", PHP_EOL;
-
-// Write operation.
-$client->set('foo', 'bar');
-$current = $client->getConnection()->getCurrent()->getParameters();
-echo "Now 'foo' has been set to 'bar' on {$current->alias}!", PHP_EOL;
-
-// Read operation.
-$bar = $client->get('foo');
-$current = $client->getConnection()->getCurrent()->getParameters();
-echo "We fetched 'foo' from {$current->alias} and its value is '$bar'.", PHP_EOL;
-
-/* OUTPUT:
-Does 'foo' exist on slave? yes.
-Now 'foo' has been set to 'bar' on master!
-We fetched 'foo' from master and its value is 'bar'.
-*/

+ 0 - 52
Gameserver/Public/phpRedisAdmin/predis/examples/session_handler.php

@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// This example demonstrates how to use Predis to save PHP sessions on Redis.
-//
-// The value of `session.gc_maxlifetime` in `php.ini` will be used by default as
-// the TTL for keys holding session data but this value can be overridden when
-// creating the session handler instance using the `gc_maxlifetime` option.
-//
-// NOTE: this class requires PHP >= 5.4 but can be used on PHP 5.3 if a polyfill
-// for SessionHandlerInterface is provided either by you or an external package
-// like `symfony/http-foundation`.
-//
-// See http://www.php.net/class.sessionhandlerinterface.php for more details.
-//
-
-if (!interface_exists('SessionHandlerInterface')) {
-    die('ATTENTION: the session handler implemented by Predis requires PHP >= 5.4.0 '.
-        "or a polyfill for SessionHandlerInterface provided by an external package.\n");
-}
-
-// Instantiate a new client just like you would normally do. Using a prefix for
-// keys will effectively prefix all session keys with the specified string.
-$client = new Predis\Client($single_server, array('prefix' => 'sessions:'));
-
-// Set `gc_maxlifetime` to specify a time-to-live of 5 seconds for session keys.
-$handler = new Predis\Session\Handler($client, array('gc_maxlifetime' => 5));
-
-// Register the session handler.
-$handler->register();
-
-// We just set a fixed session ID only for the sake of our example.
-session_id('example_session_id');
-
-session_start();
-
-if (isset($_SESSION['foo'])) {
-    echo "Session has `foo` set to {$_SESSION['foo']}", PHP_EOL;
-} else {
-    $_SESSION['foo'] = $value = mt_rand();
-    echo "Empty session, `foo` has been set with $value", PHP_EOL;
-}

+ 0 - 44
Gameserver/Public/phpRedisAdmin/predis/examples/shared.php

@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/../autoload.php';
-
-function redis_version($info)
-{
-    if (isset($info['Server']['redis_version'])) {
-        return $info['Server']['redis_version'];
-    } elseif (isset($info['redis_version'])) {
-        return $info['redis_version'];
-    } else {
-        return 'unknown version';
-    }
-}
-
-$single_server = array(
-    'host' => '127.0.0.1',
-    'port' => 6379,
-    'database' => 15,
-);
-
-$multiple_servers = array(
-    array(
-       'host' => '127.0.0.1',
-       'port' => 6379,
-       'database' => 15,
-       'alias' => 'first',
-    ),
-    array(
-       'host' => '127.0.0.1',
-       'port' => 6380,
-       'database' => 15,
-       'alias' => 'second',
-    ),
-);

+ 0 - 52
Gameserver/Public/phpRedisAdmin/predis/examples/transaction_using_cas.php

@@ -1,52 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-require __DIR__.'/shared.php';
-
-// This is an implementation of an atomic client-side ZPOP using the support for
-// check-and-set (CAS) operations with MULTI/EXEC transactions, as described in
-// "WATCH explained" from http://redis.io/topics/transactions
-//
-// First, populate your database with a tiny sample data set:
-//
-// ./redis-cli
-// SELECT 15
-// ZADD zset 1 a 2 b 3 c
-//
-// Then execute this script four times and see its output.
-//
-
-function zpop($client, $key)
-{
-    $element = null;
-    $options = array(
-        'cas' => true,      // Initialize with support for CAS operations
-        'watch' => $key,    // Key that needs to be WATCHed to detect changes
-        'retry' => 3,       // Number of retries on aborted transactions, after
-                            // which the client bails out with an exception.
-    );
-
-    $client->transaction($options, function ($tx) use ($key, &$element) {
-        @list($element) = $tx->zrange($key, 0, 0);
-
-        if (isset($element)) {
-            $tx->multi();   // With CAS, MULTI *must* be explicitly invoked.
-            $tx->zrem($key, $element);
-        }
-    });
-
-    return $element;
-}
-
-$client = new Predis\Client($single_server);
-$zpopped = zpop($client, 'zset');
-
-echo isset($zpopped) ? "ZPOPed $zpopped" : 'Nothing to ZPOP!', PHP_EOL;

+ 0 - 36
Gameserver/Public/phpRedisAdmin/predis/package.ini

@@ -1,36 +0,0 @@
-; This file is meant to be used with Onion http://c9s.github.com/Onion/
-; For instructions on how to build a PEAR package of Predis please follow
-; the instructions at this URL:
-;
-; https://github.com/c9s/Onion#a-quick-tutorial-for-building-pear-package
-;
-
-[package]
-name        = "Predis"
-desc        = "Flexible and feature-complete Redis client for PHP and HHVM"
-homepage    = "http://github.com/nrk/predis"
-license     = "MIT"
-version     = "1.1.2"
-stability   = "devel"
-channel     = "pear.nrk.io"
-
-author      = "Daniele Alessandri \"nrk\" <suppakilla@gmail.com>"
-
-[require]
-php = ">= 5.3.9"
-pearinstaller = "1.4.1"
-
-[roles]
-*.xml.dist = test
-*.md = doc
-LICENSE = doc
-
-[optional phpiredis]
-hint = "Add support for faster protocol handling with phpiredis"
-extensions[] = socket
-extensions[] = phpiredis
-
-[optional webdis]
-hint = "Add support for Webdis"
-extensions[] = curl
-extensions[] = phpiredis

+ 0 - 50
Gameserver/Public/phpRedisAdmin/predis/phpunit.xml.dist

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit bootstrap="tests/bootstrap.php"
-         colors="true"
-         convertErrorsToExceptions="true"
-         convertNoticesToExceptions="true"
-         convertWarningsToExceptions="true"
-         processIsolation="false"
-         stopOnError="false"
-         stopOnFailure="false"
-         syntaxCheck="true"
-         beStrictAboutTestSize="true"
-         beStrictAboutTestsThatDoNotTestAnything="true">
-
-    <testsuites>
-        <testsuite name="Predis Test Suite">
-            <directory>tests/Predis/</directory>
-        </testsuite>
-    </testsuites>
-
-    <groups>
-        <exclude>
-            <group>ext-phpiredis</group>
-            <group>ext-curl</group>
-            <group>realm-webdis</group>
-            <!-- <group>connected</group> -->
-            <!-- <group>disconnected</group> -->
-            <!-- <group>commands</group> -->
-            <!-- <group>slow</group> -->
-        </exclude>
-    </groups>
-
-    <filter>
-        <whitelist>
-            <directory suffix=".php">src/</directory>
-        </whitelist>
-    </filter>
-
-    <php>
-        <!-- Redis -->
-        <const name="REDIS_SERVER_VERSION" value="3.2" />
-        <const name="REDIS_SERVER_HOST" value="127.0.0.1" />
-        <const name="REDIS_SERVER_PORT" value="6379" />
-        <const name="REDIS_SERVER_DBNUM" value="15" />
-
-        <!-- Webdis -->
-        <const name="WEBDIS_SERVER_HOST" value="127.0.0.1" />
-        <const name="WEBDIS_SERVER_PORT" value="7379" />
-    </php>
-</phpunit>

+ 0 - 54
Gameserver/Public/phpRedisAdmin/predis/phpunit.xml.travisci

@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit bootstrap="tests/bootstrap.php"
-         colors="true"
-         convertErrorsToExceptions="true"
-         convertNoticesToExceptions="true"
-         convertWarningsToExceptions="true"
-         processIsolation="false"
-         stopOnError="false"
-         stopOnFailure="false"
-         syntaxCheck="true"
-         beStrictAboutTestSize="true"
-         beStrictAboutTestsThatDoNotTestAnything="true">
-
-    <testsuites>
-        <testsuite name="Predis Test Suite">
-            <directory>tests/Predis/</directory>
-        </testsuite>
-    </testsuites>
-
-    <groups>
-        <exclude>
-            <group>ext-phpiredis</group>
-            <group>ext-curl</group>
-            <group>realm-webdis</group>
-            <!-- <group>connected</group> -->
-            <!-- <group>disconnected</group> -->
-            <!-- <group>commands</group> -->
-            <!-- <group>slow</group> -->
-        </exclude>
-    </groups>
-
-    <filter>
-        <whitelist>
-            <directory suffix=".php">src/</directory>
-        </whitelist>
-    </filter>
-
-    <logging>
-        <log type="coverage-text" target="php://stdout" />
-    </logging>
-
-    <php>
-        <!-- Redis -->
-        <const name="REDIS_SERVER_VERSION" value="3.2" />
-        <const name="REDIS_SERVER_HOST" value="127.0.0.1" />
-        <const name="REDIS_SERVER_PORT" value="6379" />
-        <const name="REDIS_SERVER_DBNUM" value="15" />
-
-        <!-- Webdis -->
-        <const name="WEBDIS_SERVER_HOST" value="127.0.0.1" />
-        <const name="WEBDIS_SERVER_PORT" value="7379" />
-    </php>
-</phpunit>

+ 0 - 62
Gameserver/Public/phpRedisAdmin/predis/src/Autoloader.php

@@ -1,62 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis;
-
-/**
- * Implements a lightweight PSR-0 compliant autoloader for Predis.
- *
- * @author Eric Naeseth <eric@thumbtack.com>
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class Autoloader
-{
-    private $directory;
-    private $prefix;
-    private $prefixLength;
-
-    /**
-     * @param string $baseDirectory Base directory where the source files are located.
-     */
-    public function __construct($baseDirectory = __DIR__)
-    {
-        $this->directory = $baseDirectory;
-        $this->prefix = __NAMESPACE__.'\\';
-        $this->prefixLength = strlen($this->prefix);
-    }
-
-    /**
-     * Registers the autoloader class with the PHP SPL autoloader.
-     *
-     * @param bool $prepend Prepend the autoloader on the stack instead of appending it.
-     */
-    public static function register($prepend = false)
-    {
-        spl_autoload_register(array(new self(), 'autoload'), true, $prepend);
-    }
-
-    /**
-     * Loads a class from a file using its fully qualified name.
-     *
-     * @param string $className Fully qualified name of a class.
-     */
-    public function autoload($className)
-    {
-        if (0 === strpos($className, $this->prefix)) {
-            $parts = explode('\\', substr($className, $this->prefixLength));
-            $filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';
-
-            if (is_file($filepath)) {
-                require $filepath;
-            }
-        }
-    }
-}

+ 0 - 519
Gameserver/Public/phpRedisAdmin/predis/src/Client.php

@@ -1,519 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis;
-
-use Predis\Command\CommandInterface;
-use Predis\Command\RawCommand;
-use Predis\Command\ScriptCommand;
-use Predis\Configuration\Options;
-use Predis\Configuration\OptionsInterface;
-use Predis\Connection\AggregateConnectionInterface;
-use Predis\Connection\ConnectionInterface;
-use Predis\Connection\ParametersInterface;
-use Predis\Monitor\Consumer as MonitorConsumer;
-use Predis\Pipeline\Pipeline;
-use Predis\PubSub\Consumer as PubSubConsumer;
-use Predis\Response\ErrorInterface as ErrorResponseInterface;
-use Predis\Response\ResponseInterface;
-use Predis\Response\ServerException;
-use Predis\Transaction\MultiExec as MultiExecTransaction;
-
-/**
- * Client class used for connecting and executing commands on Redis.
- *
- * This is the main high-level abstraction of Predis upon which various other
- * abstractions are built. Internally it aggregates various other classes each
- * one with its own responsibility and scope.
- *
- * {@inheritdoc}
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class Client implements ClientInterface, \IteratorAggregate {
-
-    const VERSION = '1.1.2-dev';
-
-    protected $connection;
-    protected $options;
-    private $profile;
-
-    /**
-     * @param mixed $parameters Connection parameters for one or more servers.
-     * @param mixed $options    Options to configure some behaviours of the client.
-     */
-    public function __construct($parameters = null, $options = null) {
-        $this->options = $this->createOptions($options ?: array());
-        $this->connection = $this->createConnection($parameters ?: array());
-        $this->profile = $this->options->profile;
-    }
-
-    /**
-     * Creates a new instance of Predis\Configuration\Options from different
-     * types of arguments or simply returns the passed argument if it is an
-     * instance of Predis\Configuration\OptionsInterface.
-     *
-     * @param mixed $options Client options.
-     *
-     * @throws \InvalidArgumentException
-     *
-     * @return OptionsInterface
-     */
-    protected function createOptions($options) {
-        if (is_array($options)) {
-            return new Options($options);
-        }
-
-        if ($options instanceof OptionsInterface) {
-            return $options;
-        }
-
-        throw new \InvalidArgumentException('Invalid type for client options.');
-    }
-
-    /**
-     * Creates single or aggregate connections from different types of arguments
-     * (string, array) or returns the passed argument if it is an instance of a
-     * class implementing Predis\Connection\ConnectionInterface.
-     *
-     * Accepted types for connection parameters are:
-     *
-     *  - Instance of Predis\Connection\ConnectionInterface.
-     *  - Instance of Predis\Connection\ParametersInterface.
-     *  - Array
-     *  - String
-     *  - Callable
-     *
-     * @param mixed $parameters Connection parameters or connection instance.
-     *
-     * @throws \InvalidArgumentException
-     *
-     * @return ConnectionInterface
-     */
-    protected function createConnection($parameters) {
-        if ($parameters instanceof ConnectionInterface) {
-            return $parameters;
-        }
-
-        if ($parameters instanceof ParametersInterface || is_string($parameters)) {
-            return $this->options->connections->create($parameters);
-        }
-
-        if (is_array($parameters)) {
-            if (!isset($parameters[0])) {
-                return $this->options->connections->create($parameters);
-            }
-
-            $options = $this->options;
-
-            if ($options->defined('aggregate')) {
-                $initializer = $this->getConnectionInitializerWrapper($options->aggregate);
-                $connection = $initializer($parameters, $options);
-            } elseif ($options->defined('replication')) {
-                $replication = $options->replication;
-
-                if ($replication instanceof AggregateConnectionInterface) {
-                    $connection = $replication;
-                    $options->connections->aggregate($connection, $parameters);
-                } else {
-                    $initializer = $this->getConnectionInitializerWrapper($replication);
-                    $connection = $initializer($parameters, $options);
-                }
-            } else {
-                $connection = $options->cluster;
-                $options->connections->aggregate($connection, $parameters);
-            }
-
-            return $connection;
-        }
-
-        if (is_callable($parameters)) {
-            $initializer = $this->getConnectionInitializerWrapper($parameters);
-            $connection = $initializer($this->options);
-
-            return $connection;
-        }
-
-        throw new \InvalidArgumentException('Invalid type for connection parameters.');
-    }
-
-    /**
-     * Wraps a callable to make sure that its returned value represents a valid
-     * connection type.
-     *
-     * @param mixed $callable
-     *
-     * @return \Closure
-     */
-    protected function getConnectionInitializerWrapper($callable) {
-        return function () use ($callable) {
-            $connection = call_user_func_array($callable, func_get_args());
-
-            if (!$connection instanceof ConnectionInterface) {
-                throw new \UnexpectedValueException(
-                        'The callable connection initializer returned an invalid type.'
-                );
-            }
-
-            return $connection;
-        };
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getProfile() {
-        return $this->profile;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getOptions() {
-        return $this->options;
-    }
-
-    /**
-     * Creates a new client instance for the specified connection ID or alias,
-     * only when working with an aggregate connection (cluster, replication).
-     * The new client instances uses the same options of the original one.
-     *
-     * @param string $connectionID Identifier of a connection.
-     *
-     * @throws \InvalidArgumentException
-     *
-     * @return Client
-     */
-    public function getClientFor($connectionID) {
-        if (!$connection = $this->getConnectionById($connectionID)) {
-            throw new \InvalidArgumentException("Invalid connection ID: $connectionID.");
-        }
-
-        return new static($connection, $this->options);
-    }
-
-    /**
-     * Opens the underlying connection and connects to the server.
-     */
-    public function connect() {
-        $this->connection->connect();
-    }
-
-    /**
-     * Closes the underlying connection and disconnects from the server.
-     */
-    public function disconnect() {
-        $this->connection->disconnect();
-    }
-
-    /**
-     * Closes the underlying connection and disconnects from the server.
-     *
-     * This is the same as `Client::disconnect()` as it does not actually send
-     * the `QUIT` command to Redis, but simply closes the connection.
-     */
-    public function quit() {
-        $this->disconnect();
-    }
-
-    /**
-     * Returns the current state of the underlying connection.
-     *
-     * @return bool
-     */
-    public function isConnected() {
-        return $this->connection->isConnected();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getConnection() {
-        return $this->connection;
-    }
-
-    /**
-     * Retrieves the specified connection from the aggregate connection when the
-     * client is in cluster or replication mode.
-     *
-     * @param string $connectionID Index or alias of the single connection.
-     *
-     * @throws NotSupportedException
-     *
-     * @return Connection\NodeConnectionInterface
-     */
-    public function getConnectionById($connectionID) {
-        if (!$this->connection instanceof AggregateConnectionInterface) {
-            throw new NotSupportedException(
-                    'Retrieving connections by ID is supported only by aggregate connections.'
-            );
-        }
-
-        return $this->connection->getConnectionById($connectionID);
-    }
-
-    /**
-     * Executes a command without filtering its arguments, parsing the response,
-     * applying any prefix to keys or throwing exceptions on Redis errors even
-     * regardless of client options.
-     *
-     * It is possible to identify Redis error responses from normal responses
-     * using the second optional argument which is populated by reference.
-     *
-     * @param array $arguments Command arguments as defined by the command signature.
-     * @param bool  $error     Set to TRUE when Redis returned an error response.
-     *
-     * @return mixed
-     */
-    public function executeRaw(array $arguments, &$error = null) {
-        $error = false;
-
-        $response = $this->connection->executeCommand(
-                new RawCommand($arguments)
-        );
-
-        if ($response instanceof ResponseInterface) {
-            if ($response instanceof ErrorResponseInterface) {
-                $error = true;
-            }
-
-            return (string) $response;
-        }
-
-        return $response;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function __call($commandID, $arguments) {
-        return $this->executeCommand(
-                        $this->createCommand($commandID, $arguments)
-        );
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function createCommand($commandID, $arguments = array()) {
-        return $this->profile->createCommand($commandID, $arguments);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function executeCommand(CommandInterface $command) {
-        $response = $this->connection->executeCommand($command);
-
-        if ($response instanceof ResponseInterface) {
-            if ($response instanceof ErrorResponseInterface) {
-                $response = $this->onErrorResponse($command, $response);
-            }
-
-            return $response;
-        }
-
-        return $command->parseResponse($response);
-    }
-
-    /**
-     * Handles -ERR responses returned by Redis.
-     *
-     * @param CommandInterface       $command  Redis command that generated the error.
-     * @param ErrorResponseInterface $response Instance of the error response.
-     *
-     * @throws ServerException
-     *
-     * @return mixed
-     */
-    protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response) {
-        if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
-            $eval = $this->createCommand('EVAL');
-            $eval->setRawArguments($command->getEvalArguments());
-
-            $response = $this->executeCommand($eval);
-
-            if (!$response instanceof ResponseInterface) {
-                $response = $command->parseResponse($response);
-            }
-
-            return $response;
-        }
-
-        if ($this->options->exceptions) {
-            throw new ServerException($response->getMessage());
-        }
-
-        return $response;
-    }
-
-    /**
-     * Executes the specified initializer method on `$this` by adjusting the
-     * actual invokation depending on the arity (0, 1 or 2 arguments). This is
-     * simply an utility method to create Redis contexts instances since they
-     * follow a common initialization path.
-     *
-     * @param string $initializer Method name.
-     * @param array  $argv        Arguments for the method.
-     *
-     * @return mixed
-     */
-    private function sharedContextFactory($initializer, $argv = null) {
-        switch (count($argv)) {
-            case 0:
-                return $this->$initializer();
-
-            case 1:
-                return is_array($argv[0]) ? $this->$initializer($argv[0]) : $this->$initializer(null, $argv[0]);
-
-            case 2:
-                list($arg0, $arg1) = $argv;
-
-                return $this->$initializer($arg0, $arg1);
-
-            default:
-                return $this->$initializer($this, $argv);
-        }
-    }
-
-    /**
-     * Creates a new pipeline context and returns it, or returns the results of
-     * a pipeline executed inside the optionally provided callable object.
-     *
-     * @param mixed ... Array of options, a callable for execution, or both.
-     *
-     * @return Pipeline|array
-     */
-    public function pipeline(/* arguments */) {
-        return $this->sharedContextFactory('createPipeline', func_get_args());
-    }
-
-    /**
-     * Actual pipeline context initializer method.
-     *
-     * @param array $options  Options for the context.
-     * @param mixed $callable Optional callable used to execute the context.
-     *
-     * @return Pipeline|array
-     */
-    protected function createPipeline(array $options = null, $callable = null) {
-        if (isset($options['atomic']) && $options['atomic']) {
-            $class = 'Predis\Pipeline\Atomic';
-        } elseif (isset($options['fire-and-forget']) && $options['fire-and-forget']) {
-            $class = 'Predis\Pipeline\FireAndForget';
-        } else {
-            $class = 'Predis\Pipeline\Pipeline';
-        }
-
-        /*
-         * @var ClientContextInterface
-         */
-        $pipeline = new $class($this);
-
-        if (isset($callable)) {
-            return $pipeline->execute($callable);
-        }
-
-        return $pipeline;
-    }
-
-    /**
-     * Creates a new transaction context and returns it, or returns the results
-     * of a transaction executed inside the optionally provided callable object.
-     *
-     * @param mixed ... Array of options, a callable for execution, or both.
-     *
-     * @return MultiExecTransaction|array
-     */
-    public function transaction(/* arguments */) {
-        return $this->sharedContextFactory('createTransaction', func_get_args());
-    }
-
-    /**
-     * Actual transaction context initializer method.
-     *
-     * @param array $options  Options for the context.
-     * @param mixed $callable Optional callable used to execute the context.
-     *
-     * @return MultiExecTransaction|array
-     */
-    protected function createTransaction(array $options = null, $callable = null) {
-        $transaction = new MultiExecTransaction($this, $options);
-
-        if (isset($callable)) {
-            return $transaction->execute($callable);
-        }
-
-        return $transaction;
-    }
-
-    /**
-     * Creates a new publish/subscribe context and returns it, or starts its loop
-     * inside the optionally provided callable object.
-     *
-     * @param mixed ... Array of options, a callable for execution, or both.
-     *
-     * @return PubSubConsumer|null
-     */
-    public function pubSubLoop(/* arguments */) {
-        return $this->sharedContextFactory('createPubSub', func_get_args());
-    }
-
-    /**
-     * Actual publish/subscribe context initializer method.
-     *
-     * @param array $options  Options for the context.
-     * @param mixed $callable Optional callable used to execute the context.
-     *
-     * @return PubSubConsumer|null
-     */
-    protected function createPubSub(array $options = null, $callable = null) {
-        $pubsub = new PubSubConsumer($this, $options);
-
-        if (!isset($callable)) {
-            return $pubsub;
-        }
-
-        foreach ($pubsub as $message) {
-            if (call_user_func($callable, $pubsub, $message) === false) {
-                $pubsub->stop();
-            }
-        }
-    }
-
-    /**
-     * Creates a new monitor consumer and returns it.
-     *
-     * @return MonitorConsumer
-     */
-    public function monitor() {
-        return new MonitorConsumer($this);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getIterator() {
-        $clients = array();
-        $connection = $this->getConnection();
-
-        if (!$connection instanceof \Traversable) {
-            throw new ClientException('The underlying connection is not traversable');
-        }
-
-        foreach ($connection as $node) {
-            $clients[(string) $node] = new static($node, $this->getOptions());
-        }
-
-        return new \ArrayIterator($clients);
-    }
-
-}

+ 0 - 198
Gameserver/Public/phpRedisAdmin/predis/src/ClientContextInterface.php

@@ -1,198 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis;
-
-use Predis\Command\CommandInterface;
-
-/**
- * Interface defining a client-side context such as a pipeline or transaction.
- *
- * @method $this del(array $keys)
- * @method $this dump($key)
- * @method $this exists($key)
- * @method $this expire($key, $seconds)
- * @method $this expireat($key, $timestamp)
- * @method $this keys($pattern)
- * @method $this move($key, $db)
- * @method $this object($subcommand, $key)
- * @method $this persist($key)
- * @method $this pexpire($key, $milliseconds)
- * @method $this pexpireat($key, $timestamp)
- * @method $this pttl($key)
- * @method $this randomkey()
- * @method $this rename($key, $target)
- * @method $this renamenx($key, $target)
- * @method $this scan($cursor, array $options = null)
- * @method $this sort($key, array $options = null)
- * @method $this ttl($key)
- * @method $this type($key)
- * @method $this append($key, $value)
- * @method $this bitcount($key, $start = null, $end = null)
- * @method $this bitop($operation, $destkey, $key)
- * @method $this bitfield($key, $subcommand, ...$subcommandArg)
- * @method $this decr($key)
- * @method $this decrby($key, $decrement)
- * @method $this get($key)
- * @method $this getbit($key, $offset)
- * @method $this getrange($key, $start, $end)
- * @method $this getset($key, $value)
- * @method $this incr($key)
- * @method $this incrby($key, $increment)
- * @method $this incrbyfloat($key, $increment)
- * @method $this mget(array $keys)
- * @method $this mset(array $dictionary)
- * @method $this msetnx(array $dictionary)
- * @method $this psetex($key, $milliseconds, $value)
- * @method $this set($key, $value, $expireResolution = null, $expireTTL = null, $flag = null)
- * @method $this setbit($key, $offset, $value)
- * @method $this setex($key, $seconds, $value)
- * @method $this setnx($key, $value)
- * @method $this setrange($key, $offset, $value)
- * @method $this strlen($key)
- * @method $this hdel($key, array $fields)
- * @method $this hexists($key, $field)
- * @method $this hget($key, $field)
- * @method $this hgetall($key)
- * @method $this hincrby($key, $field, $increment)
- * @method $this hincrbyfloat($key, $field, $increment)
- * @method $this hkeys($key)
- * @method $this hlen($key)
- * @method $this hmget($key, array $fields)
- * @method $this hmset($key, array $dictionary)
- * @method $this hscan($key, $cursor, array $options = null)
- * @method $this hset($key, $field, $value)
- * @method $this hsetnx($key, $field, $value)
- * @method $this hvals($key)
- * @method $this hstrlen($key, $field)
- * @method $this blpop(array $keys, $timeout)
- * @method $this brpop(array $keys, $timeout)
- * @method $this brpoplpush($source, $destination, $timeout)
- * @method $this lindex($key, $index)
- * @method $this linsert($key, $whence, $pivot, $value)
- * @method $this llen($key)
- * @method $this lpop($key)
- * @method $this lpush($key, array $values)
- * @method $this lpushx($key, $value)
- * @method $this lrange($key, $start, $stop)
- * @method $this lrem($key, $count, $value)
- * @method $this lset($key, $index, $value)
- * @method $this ltrim($key, $start, $stop)
- * @method $this rpop($key)
- * @method $this rpoplpush($source, $destination)
- * @method $this rpush($key, array $values)
- * @method $this rpushx($key, $value)
- * @method $this sadd($key, array $members)
- * @method $this scard($key)
- * @method $this sdiff(array $keys)
- * @method $this sdiffstore($destination, array $keys)
- * @method $this sinter(array $keys)
- * @method $this sinterstore($destination, array $keys)
- * @method $this sismember($key, $member)
- * @method $this smembers($key)
- * @method $this smove($source, $destination, $member)
- * @method $this spop($key, $count = null)
- * @method $this srandmember($key, $count = null)
- * @method $this srem($key, $member)
- * @method $this sscan($key, $cursor, array $options = null)
- * @method $this sunion(array $keys)
- * @method $this sunionstore($destination, array $keys)
- * @method $this zadd($key, array $membersAndScoresDictionary)
- * @method $this zcard($key)
- * @method $this zcount($key, $min, $max)
- * @method $this zincrby($key, $increment, $member)
- * @method $this zinterstore($destination, array $keys, array $options = null)
- * @method $this zrange($key, $start, $stop, array $options = null)
- * @method $this zrangebyscore($key, $min, $max, array $options = null)
- * @method $this zrank($key, $member)
- * @method $this zrem($key, $member)
- * @method $this zremrangebyrank($key, $start, $stop)
- * @method $this zremrangebyscore($key, $min, $max)
- * @method $this zrevrange($key, $start, $stop, array $options = null)
- * @method $this zrevrangebyscore($key, $min, $max, array $options = null)
- * @method $this zrevrank($key, $member)
- * @method $this zunionstore($destination, array $keys, array $options = null)
- * @method $this zscore($key, $member)
- * @method $this zscan($key, $cursor, array $options = null)
- * @method $this zrangebylex($key, $start, $stop, array $options = null)
- * @method $this zrevrangebylex($key, $start, $stop, array $options = null)
- * @method $this zremrangebylex($key, $min, $max)
- * @method $this zlexcount($key, $min, $max)
- * @method $this pfadd($key, array $elements)
- * @method $this pfmerge($destinationKey, array $sourceKeys)
- * @method $this pfcount(array $keys)
- * @method $this pubsub($subcommand, $argument)
- * @method $this publish($channel, $message)
- * @method $this discard()
- * @method $this exec()
- * @method $this multi()
- * @method $this unwatch()
- * @method $this watch($key)
- * @method $this eval($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null)
- * @method $this evalsha($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null)
- * @method $this script($subcommand, $argument = null)
- * @method $this auth($password)
- * @method $this echo($message)
- * @method $this ping($message = null)
- * @method $this select($database)
- * @method $this bgrewriteaof()
- * @method $this bgsave()
- * @method $this client($subcommand, $argument = null)
- * @method $this config($subcommand, $argument = null)
- * @method $this dbsize()
- * @method $this flushall()
- * @method $this flushdb()
- * @method $this info($section = null)
- * @method $this lastsave()
- * @method $this save()
- * @method $this slaveof($host, $port)
- * @method $this slowlog($subcommand, $argument = null)
- * @method $this time()
- * @method $this command()
- * @method $this geoadd($key, $longitude, $latitude, $member)
- * @method $this geohash($key, array $members)
- * @method $this geopos($key, array $members)
- * @method $this geodist($key, $member1, $member2, $unit = null)
- * @method $this georadius($key, $longitude, $latitude, $radius, $unit, array $options = null)
- * @method $this georadiusbymember($key, $member, $radius, $unit, array $options = null)
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-interface ClientContextInterface
-{
-    /**
-     * Sends the specified command instance to Redis.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return mixed
-     */
-    public function executeCommand(CommandInterface $command);
-
-    /**
-     * Sends the specified command with its arguments to Redis.
-     *
-     * @param string $method    Command ID.
-     * @param array  $arguments Arguments for the command.
-     *
-     * @return mixed
-     */
-    public function __call($method, $arguments);
-
-    /**
-     * Starts the execution of the context.
-     *
-     * @param mixed $callable Optional callback for execution.
-     *
-     * @return array
-     */
-    public function execute($callable = null);
-}

+ 0 - 21
Gameserver/Public/phpRedisAdmin/predis/src/ClientException.php

@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis;
-
-/**
- * Exception class that identifies client-side errors.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class ClientException extends PredisException
-{
-}

+ 0 - 239
Gameserver/Public/phpRedisAdmin/predis/src/ClientInterface.php

@@ -1,239 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis;
-
-use Predis\Command\CommandInterface;
-use Predis\Configuration\OptionsInterface;
-use Predis\Connection\ConnectionInterface;
-use Predis\Profile\ProfileInterface;
-
-/**
- * Interface defining a client able to execute commands against Redis.
- *
- * All the commands exposed by the client generally have the same signature as
- * described by the Redis documentation, but some of them offer an additional
- * and more friendly interface to ease programming which is described in the
- * following list of methods:
- *
- * @method int    del(array $keys)
- * @method string dump($key)
- * @method int    exists($key)
- * @method int    expire($key, $seconds)
- * @method int    expireat($key, $timestamp)
- * @method array  keys($pattern)
- * @method int    move($key, $db)
- * @method mixed  object($subcommand, $key)
- * @method int    persist($key)
- * @method int    pexpire($key, $milliseconds)
- * @method int    pexpireat($key, $timestamp)
- * @method int    pttl($key)
- * @method string randomkey()
- * @method mixed  rename($key, $target)
- * @method int    renamenx($key, $target)
- * @method array  scan($cursor, array $options = null)
- * @method array  sort($key, array $options = null)
- * @method int    ttl($key)
- * @method mixed  type($key)
- * @method int    append($key, $value)
- * @method int    bitcount($key, $start = null, $end = null)
- * @method int    bitop($operation, $destkey, $key)
- * @method array  bitfield($key, $subcommand, ...$subcommandArg)
- * @method int    decr($key)
- * @method int    decrby($key, $decrement)
- * @method string get($key)
- * @method int    getbit($key, $offset)
- * @method string getrange($key, $start, $end)
- * @method string getset($key, $value)
- * @method int    incr($key)
- * @method int    incrby($key, $increment)
- * @method string incrbyfloat($key, $increment)
- * @method array  mget(array $keys)
- * @method mixed  mset(array $dictionary)
- * @method int    msetnx(array $dictionary)
- * @method mixed  psetex($key, $milliseconds, $value)
- * @method mixed  set($key, $value, $expireResolution = null, $expireTTL = null, $flag = null)
- * @method int    setbit($key, $offset, $value)
- * @method int    setex($key, $seconds, $value)
- * @method int    setnx($key, $value)
- * @method int    setrange($key, $offset, $value)
- * @method int    strlen($key)
- * @method int    hdel($key, array $fields)
- * @method int    hexists($key, $field)
- * @method string hget($key, $field)
- * @method array  hgetall($key)
- * @method int    hincrby($key, $field, $increment)
- * @method string hincrbyfloat($key, $field, $increment)
- * @method array  hkeys($key)
- * @method int    hlen($key)
- * @method array  hmget($key, array $fields)
- * @method mixed  hmset($key, array $dictionary)
- * @method array  hscan($key, $cursor, array $options = null)
- * @method int    hset($key, $field, $value)
- * @method int    hsetnx($key, $field, $value)
- * @method array  hvals($key)
- * @method int    hstrlen($key, $field)
- * @method array  blpop(array $keys, $timeout)
- * @method array  brpop(array $keys, $timeout)
- * @method array  brpoplpush($source, $destination, $timeout)
- * @method string lindex($key, $index)
- * @method int    linsert($key, $whence, $pivot, $value)
- * @method int    llen($key)
- * @method string lpop($key)
- * @method int    lpush($key, array $values)
- * @method int    lpushx($key, $value)
- * @method array  lrange($key, $start, $stop)
- * @method int    lrem($key, $count, $value)
- * @method mixed  lset($key, $index, $value)
- * @method mixed  ltrim($key, $start, $stop)
- * @method string rpop($key)
- * @method string rpoplpush($source, $destination)
- * @method int    rpush($key, array $values)
- * @method int    rpushx($key, $value)
- * @method int    sadd($key, array $members)
- * @method int    scard($key)
- * @method array  sdiff(array $keys)
- * @method int    sdiffstore($destination, array $keys)
- * @method array  sinter(array $keys)
- * @method int    sinterstore($destination, array $keys)
- * @method int    sismember($key, $member)
- * @method array  smembers($key)
- * @method int    smove($source, $destination, $member)
- * @method string spop($key, $count = null)
- * @method string srandmember($key, $count = null)
- * @method int    srem($key, $member)
- * @method array  sscan($key, $cursor, array $options = null)
- * @method array  sunion(array $keys)
- * @method int    sunionstore($destination, array $keys)
- * @method int    zadd($key, array $membersAndScoresDictionary)
- * @method int    zcard($key)
- * @method string zcount($key, $min, $max)
- * @method string zincrby($key, $increment, $member)
- * @method int    zinterstore($destination, array $keys, array $options = null)
- * @method array  zrange($key, $start, $stop, array $options = null)
- * @method array  zrangebyscore($key, $min, $max, array $options = null)
- * @method int    zrank($key, $member)
- * @method int    zrem($key, $member)
- * @method int    zremrangebyrank($key, $start, $stop)
- * @method int    zremrangebyscore($key, $min, $max)
- * @method array  zrevrange($key, $start, $stop, array $options = null)
- * @method array  zrevrangebyscore($key, $max, $min, array $options = null)
- * @method int    zrevrank($key, $member)
- * @method int    zunionstore($destination, array $keys, array $options = null)
- * @method string zscore($key, $member)
- * @method array  zscan($key, $cursor, array $options = null)
- * @method array  zrangebylex($key, $start, $stop, array $options = null)
- * @method array  zrevrangebylex($key, $start, $stop, array $options = null)
- * @method int    zremrangebylex($key, $min, $max)
- * @method int    zlexcount($key, $min, $max)
- * @method int    pfadd($key, array $elements)
- * @method mixed  pfmerge($destinationKey, array $sourceKeys)
- * @method int    pfcount(array $keys)
- * @method mixed  pubsub($subcommand, $argument)
- * @method int    publish($channel, $message)
- * @method mixed  discard()
- * @method array  exec()
- * @method mixed  multi()
- * @method mixed  unwatch()
- * @method mixed  watch($key)
- * @method mixed  eval($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null)
- * @method mixed  evalsha($script, $numkeys, $keyOrArg1 = null, $keyOrArgN = null)
- * @method mixed  script($subcommand, $argument = null)
- * @method mixed  auth($password)
- * @method string echo($message)
- * @method mixed  ping($message = null)
- * @method mixed  select($database)
- * @method mixed  bgrewriteaof()
- * @method mixed  bgsave()
- * @method mixed  client($subcommand, $argument = null)
- * @method mixed  config($subcommand, $argument = null)
- * @method int    dbsize()
- * @method mixed  flushall()
- * @method mixed  flushdb()
- * @method array  info($section = null)
- * @method int    lastsave()
- * @method mixed  save()
- * @method mixed  slaveof($host, $port)
- * @method mixed  slowlog($subcommand, $argument = null)
- * @method array  time()
- * @method array  command()
- * @method int    geoadd($key, $longitude, $latitude, $member)
- * @method array  geohash($key, array $members)
- * @method array  geopos($key, array $members)
- * @method string geodist($key, $member1, $member2, $unit = null)
- * @method array  georadius($key, $longitude, $latitude, $radius, $unit, array $options = null)
- * @method array  georadiusbymember($key, $member, $radius, $unit, array $options = null)
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-interface ClientInterface
-{
-    /**
-     * Returns the server profile used by the client.
-     *
-     * @return ProfileInterface
-     */
-    public function getProfile();
-
-    /**
-     * Returns the client options specified upon initialization.
-     *
-     * @return OptionsInterface
-     */
-    public function getOptions();
-
-    /**
-     * Opens the underlying connection to the server.
-     */
-    public function connect();
-
-    /**
-     * Closes the underlying connection from the server.
-     */
-    public function disconnect();
-
-    /**
-     * Returns the underlying connection instance.
-     *
-     * @return ConnectionInterface
-     */
-    public function getConnection();
-
-    /**
-     * Creates a new instance of the specified Redis command.
-     *
-     * @param string $method    Command ID.
-     * @param array  $arguments Arguments for the command.
-     *
-     * @return CommandInterface
-     */
-    public function createCommand($method, $arguments = array());
-
-    /**
-     * Executes the specified Redis command.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return mixed
-     */
-    public function executeCommand(CommandInterface $command);
-
-    /**
-     * Creates a Redis command with the specified arguments and sends a request
-     * to the server.
-     *
-     * @param string $method    Command ID.
-     * @param array  $arguments Arguments for the command.
-     *
-     * @return mixed
-     */
-    public function __call($method, $arguments);
-}

+ 0 - 469
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/ClusterStrategy.php

@@ -1,469 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster;
-
-use Predis\Command\CommandInterface;
-use Predis\Command\ScriptCommand;
-
-/**
- * Common class implementing the logic needed to support clustering strategies.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-abstract class ClusterStrategy implements StrategyInterface
-{
-    protected $commands;
-
-    /**
-     *
-     */
-    public function __construct()
-    {
-        $this->commands = $this->getDefaultCommands();
-    }
-
-    /**
-     * Returns the default map of supported commands with their handlers.
-     *
-     * @return array
-     */
-    protected function getDefaultCommands()
-    {
-        $getKeyFromFirstArgument = array($this, 'getKeyFromFirstArgument');
-        $getKeyFromAllArguments = array($this, 'getKeyFromAllArguments');
-
-        return array(
-            /* commands operating on the key space */
-            'EXISTS' => $getKeyFromAllArguments,
-            'DEL' => $getKeyFromAllArguments,
-            'TYPE' => $getKeyFromFirstArgument,
-            'EXPIRE' => $getKeyFromFirstArgument,
-            'EXPIREAT' => $getKeyFromFirstArgument,
-            'PERSIST' => $getKeyFromFirstArgument,
-            'PEXPIRE' => $getKeyFromFirstArgument,
-            'PEXPIREAT' => $getKeyFromFirstArgument,
-            'TTL' => $getKeyFromFirstArgument,
-            'PTTL' => $getKeyFromFirstArgument,
-            'SORT' => array($this, 'getKeyFromSortCommand'),
-            'DUMP' => $getKeyFromFirstArgument,
-            'RESTORE' => $getKeyFromFirstArgument,
-
-            /* commands operating on string values */
-            'APPEND' => $getKeyFromFirstArgument,
-            'DECR' => $getKeyFromFirstArgument,
-            'DECRBY' => $getKeyFromFirstArgument,
-            'GET' => $getKeyFromFirstArgument,
-            'GETBIT' => $getKeyFromFirstArgument,
-            'MGET' => $getKeyFromAllArguments,
-            'SET' => $getKeyFromFirstArgument,
-            'GETRANGE' => $getKeyFromFirstArgument,
-            'GETSET' => $getKeyFromFirstArgument,
-            'INCR' => $getKeyFromFirstArgument,
-            'INCRBY' => $getKeyFromFirstArgument,
-            'INCRBYFLOAT' => $getKeyFromFirstArgument,
-            'SETBIT' => $getKeyFromFirstArgument,
-            'SETEX' => $getKeyFromFirstArgument,
-            'MSET' => array($this, 'getKeyFromInterleavedArguments'),
-            'MSETNX' => array($this, 'getKeyFromInterleavedArguments'),
-            'SETNX' => $getKeyFromFirstArgument,
-            'SETRANGE' => $getKeyFromFirstArgument,
-            'STRLEN' => $getKeyFromFirstArgument,
-            'SUBSTR' => $getKeyFromFirstArgument,
-            'BITOP' => array($this, 'getKeyFromBitOp'),
-            'BITCOUNT' => $getKeyFromFirstArgument,
-            'BITFIELD' => $getKeyFromFirstArgument,
-
-            /* commands operating on lists */
-            'LINSERT' => $getKeyFromFirstArgument,
-            'LINDEX' => $getKeyFromFirstArgument,
-            'LLEN' => $getKeyFromFirstArgument,
-            'LPOP' => $getKeyFromFirstArgument,
-            'RPOP' => $getKeyFromFirstArgument,
-            'RPOPLPUSH' => $getKeyFromAllArguments,
-            'BLPOP' => array($this, 'getKeyFromBlockingListCommands'),
-            'BRPOP' => array($this, 'getKeyFromBlockingListCommands'),
-            'BRPOPLPUSH' => array($this, 'getKeyFromBlockingListCommands'),
-            'LPUSH' => $getKeyFromFirstArgument,
-            'LPUSHX' => $getKeyFromFirstArgument,
-            'RPUSH' => $getKeyFromFirstArgument,
-            'RPUSHX' => $getKeyFromFirstArgument,
-            'LRANGE' => $getKeyFromFirstArgument,
-            'LREM' => $getKeyFromFirstArgument,
-            'LSET' => $getKeyFromFirstArgument,
-            'LTRIM' => $getKeyFromFirstArgument,
-
-            /* commands operating on sets */
-            'SADD' => $getKeyFromFirstArgument,
-            'SCARD' => $getKeyFromFirstArgument,
-            'SDIFF' => $getKeyFromAllArguments,
-            'SDIFFSTORE' => $getKeyFromAllArguments,
-            'SINTER' => $getKeyFromAllArguments,
-            'SINTERSTORE' => $getKeyFromAllArguments,
-            'SUNION' => $getKeyFromAllArguments,
-            'SUNIONSTORE' => $getKeyFromAllArguments,
-            'SISMEMBER' => $getKeyFromFirstArgument,
-            'SMEMBERS' => $getKeyFromFirstArgument,
-            'SSCAN' => $getKeyFromFirstArgument,
-            'SPOP' => $getKeyFromFirstArgument,
-            'SRANDMEMBER' => $getKeyFromFirstArgument,
-            'SREM' => $getKeyFromFirstArgument,
-
-            /* commands operating on sorted sets */
-            'ZADD' => $getKeyFromFirstArgument,
-            'ZCARD' => $getKeyFromFirstArgument,
-            'ZCOUNT' => $getKeyFromFirstArgument,
-            'ZINCRBY' => $getKeyFromFirstArgument,
-            'ZINTERSTORE' => array($this, 'getKeyFromZsetAggregationCommands'),
-            'ZRANGE' => $getKeyFromFirstArgument,
-            'ZRANGEBYSCORE' => $getKeyFromFirstArgument,
-            'ZRANK' => $getKeyFromFirstArgument,
-            'ZREM' => $getKeyFromFirstArgument,
-            'ZREMRANGEBYRANK' => $getKeyFromFirstArgument,
-            'ZREMRANGEBYSCORE' => $getKeyFromFirstArgument,
-            'ZREVRANGE' => $getKeyFromFirstArgument,
-            'ZREVRANGEBYSCORE' => $getKeyFromFirstArgument,
-            'ZREVRANK' => $getKeyFromFirstArgument,
-            'ZSCORE' => $getKeyFromFirstArgument,
-            'ZUNIONSTORE' => array($this, 'getKeyFromZsetAggregationCommands'),
-            'ZSCAN' => $getKeyFromFirstArgument,
-            'ZLEXCOUNT' => $getKeyFromFirstArgument,
-            'ZRANGEBYLEX' => $getKeyFromFirstArgument,
-            'ZREMRANGEBYLEX' => $getKeyFromFirstArgument,
-            'ZREVRANGEBYLEX' => $getKeyFromFirstArgument,
-
-            /* commands operating on hashes */
-            'HDEL' => $getKeyFromFirstArgument,
-            'HEXISTS' => $getKeyFromFirstArgument,
-            'HGET' => $getKeyFromFirstArgument,
-            'HGETALL' => $getKeyFromFirstArgument,
-            'HMGET' => $getKeyFromFirstArgument,
-            'HMSET' => $getKeyFromFirstArgument,
-            'HINCRBY' => $getKeyFromFirstArgument,
-            'HINCRBYFLOAT' => $getKeyFromFirstArgument,
-            'HKEYS' => $getKeyFromFirstArgument,
-            'HLEN' => $getKeyFromFirstArgument,
-            'HSET' => $getKeyFromFirstArgument,
-            'HSETNX' => $getKeyFromFirstArgument,
-            'HVALS' => $getKeyFromFirstArgument,
-            'HSCAN' => $getKeyFromFirstArgument,
-            'HSTRLEN' => $getKeyFromFirstArgument,
-
-            /* commands operating on HyperLogLog */
-            'PFADD' => $getKeyFromFirstArgument,
-            'PFCOUNT' => $getKeyFromAllArguments,
-            'PFMERGE' => $getKeyFromAllArguments,
-
-            /* scripting */
-            'EVAL' => array($this, 'getKeyFromScriptingCommands'),
-            'EVALSHA' => array($this, 'getKeyFromScriptingCommands'),
-
-            /* commands performing geospatial operations */
-            'GEOADD' => $getKeyFromFirstArgument,
-            'GEOHASH' => $getKeyFromFirstArgument,
-            'GEOPOS' => $getKeyFromFirstArgument,
-            'GEODIST' => $getKeyFromFirstArgument,
-            'GEORADIUS' => array($this, 'getKeyFromGeoradiusCommands'),
-            'GEORADIUSBYMEMBER' => array($this, 'getKeyFromGeoradiusCommands'),
-        );
-    }
-
-    /**
-     * Returns the list of IDs for the supported commands.
-     *
-     * @return array
-     */
-    public function getSupportedCommands()
-    {
-        return array_keys($this->commands);
-    }
-
-    /**
-     * Sets an handler for the specified command ID.
-     *
-     * The signature of the callback must have a single parameter of type
-     * Predis\Command\CommandInterface.
-     *
-     * When the callback argument is omitted or NULL, the previously associated
-     * handler for the specified command ID is removed.
-     *
-     * @param string $commandID Command ID.
-     * @param mixed  $callback  A valid callable object, or NULL to unset the handler.
-     *
-     * @throws \InvalidArgumentException
-     */
-    public function setCommandHandler($commandID, $callback = null)
-    {
-        $commandID = strtoupper($commandID);
-
-        if (!isset($callback)) {
-            unset($this->commands[$commandID]);
-
-            return;
-        }
-
-        if (!is_callable($callback)) {
-            throw new \InvalidArgumentException(
-                'The argument must be a callable object or NULL.'
-            );
-        }
-
-        $this->commands[$commandID] = $callback;
-    }
-
-    /**
-     * Extracts the key from the first argument of a command instance.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string
-     */
-    protected function getKeyFromFirstArgument(CommandInterface $command)
-    {
-        return $command->getArgument(0);
-    }
-
-    /**
-     * Extracts the key from a command with multiple keys only when all keys in
-     * the arguments array produce the same hash.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromAllArguments(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-
-        if ($this->checkSameSlotForKeys($arguments)) {
-            return $arguments[0];
-        }
-    }
-
-    /**
-     * Extracts the key from a command with multiple keys only when all keys in
-     * the arguments array produce the same hash.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromInterleavedArguments(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-        $keys = array();
-
-        for ($i = 0; $i < count($arguments); $i += 2) {
-            $keys[] = $arguments[$i];
-        }
-
-        if ($this->checkSameSlotForKeys($keys)) {
-            return $arguments[0];
-        }
-    }
-
-    /**
-     * Extracts the key from SORT command.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromSortCommand(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-        $firstKey = $arguments[0];
-
-        if (1 === $argc = count($arguments)) {
-            return $firstKey;
-        }
-
-        $keys = array($firstKey);
-
-        for ($i = 1; $i < $argc; ++$i) {
-            if (strtoupper($arguments[$i]) === 'STORE') {
-                $keys[] = $arguments[++$i];
-            }
-        }
-
-        if ($this->checkSameSlotForKeys($keys)) {
-            return $firstKey;
-        }
-    }
-
-    /**
-     * Extracts the key from BLPOP and BRPOP commands.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromBlockingListCommands(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-
-        if ($this->checkSameSlotForKeys(array_slice($arguments, 0, count($arguments) - 1))) {
-            return $arguments[0];
-        }
-    }
-
-    /**
-     * Extracts the key from BITOP command.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromBitOp(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-
-        if ($this->checkSameSlotForKeys(array_slice($arguments, 1, count($arguments)))) {
-            return $arguments[1];
-        }
-    }
-
-    /**
-     * Extracts the key from GEORADIUS and GEORADIUSBYMEMBER commands.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromGeoradiusCommands(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-        $argc = count($arguments);
-        $startIndex = $command->getId() === 'GEORADIUS' ? 5 : 4;
-
-        if ($argc > $startIndex) {
-            $keys = array($arguments[0]);
-
-            for ($i = $startIndex; $i < $argc; ++$i) {
-                $argument = strtoupper($arguments[$i]);
-                if ($argument === 'STORE' || $argument === 'STOREDIST') {
-                    $keys[] = $arguments[++$i];
-                }
-            }
-
-            if ($this->checkSameSlotForKeys($keys)) {
-                return $arguments[0];
-            } else {
-                return;
-            }
-        }
-
-        return $arguments[0];
-    }
-
-    /**
-     * Extracts the key from ZINTERSTORE and ZUNIONSTORE commands.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromZsetAggregationCommands(CommandInterface $command)
-    {
-        $arguments = $command->getArguments();
-        $keys = array_merge(array($arguments[0]), array_slice($arguments, 2, $arguments[1]));
-
-        if ($this->checkSameSlotForKeys($keys)) {
-            return $arguments[0];
-        }
-    }
-
-    /**
-     * Extracts the key from EVAL and EVALSHA commands.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return string|null
-     */
-    protected function getKeyFromScriptingCommands(CommandInterface $command)
-    {
-        if ($command instanceof ScriptCommand) {
-            $keys = $command->getKeys();
-        } else {
-            $keys = array_slice($args = $command->getArguments(), 2, $args[1]);
-        }
-
-        if ($keys && $this->checkSameSlotForKeys($keys)) {
-            return $keys[0];
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getSlot(CommandInterface $command)
-    {
-        $slot = $command->getSlot();
-
-        if (!isset($slot) && isset($this->commands[$cmdID = $command->getId()])) {
-            $key = call_user_func($this->commands[$cmdID], $command);
-
-            if (isset($key)) {
-                $slot = $this->getSlotByKey($key);
-                $command->setSlot($slot);
-            }
-        }
-
-        return $slot;
-    }
-
-    /**
-     * Checks if the specified array of keys will generate the same hash.
-     *
-     * @param array $keys Array of keys.
-     *
-     * @return bool
-     */
-    protected function checkSameSlotForKeys(array $keys)
-    {
-        if (!$count = count($keys)) {
-            return false;
-        }
-
-        $currentSlot = $this->getSlotByKey($keys[0]);
-
-        for ($i = 1; $i < $count; ++$i) {
-            $nextSlot = $this->getSlotByKey($keys[$i]);
-
-            if ($currentSlot !== $nextSlot) {
-                return false;
-            }
-
-            $currentSlot = $nextSlot;
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns only the hashable part of a key (delimited by "{...}"), or the
-     * whole key if a key tag is not found in the string.
-     *
-     * @param string $key A key.
-     *
-     * @return string
-     */
-    protected function extractKeyTag($key)
-    {
-        if (false !== $start = strpos($key, '{')) {
-            if (false !== ($end = strpos($key, '}', $start)) && $end !== ++$start) {
-                $key = substr($key, $start, $end - $start);
-            }
-        }
-
-        return $key;
-    }
-}

+ 0 - 82
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/DistributorInterface.php

@@ -1,82 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster\Distributor;
-
-use Predis\Cluster\Hash\HashGeneratorInterface;
-
-/**
- * A distributor implements the logic to automatically distribute keys among
- * several nodes for client-side sharding.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-interface DistributorInterface
-{
-    /**
-     * Adds a node to the distributor with an optional weight.
-     *
-     * @param mixed $node   Node object.
-     * @param int   $weight Weight for the node.
-     */
-    public function add($node, $weight = null);
-
-    /**
-     * Removes a node from the distributor.
-     *
-     * @param mixed $node Node object.
-     */
-    public function remove($node);
-
-    /**
-     * Returns the corresponding slot of a node from the distributor using the
-     * computed hash of a key.
-     *
-     * @param mixed $hash
-     *
-     * @return mixed
-     */
-    public function getSlot($hash);
-
-    /**
-     * Returns a node from the distributor using its assigned slot ID.
-     *
-     * @param mixed $slot
-     *
-     * @return mixed|null
-     */
-    public function getBySlot($slot);
-
-    /**
-     * Returns a node from the distributor using the computed hash of a key.
-     *
-     * @param mixed $hash
-     *
-     * @return mixed
-     */
-    public function getByHash($hash);
-
-    /**
-     * Returns a node from the distributor mapping to the specified value.
-     *
-     * @param string $value
-     *
-     * @return mixed
-     */
-    public function get($value);
-
-    /**
-     * Returns the underlying hash generator instance.
-     *
-     * @return HashGeneratorInterface
-     */
-    public function getHashGenerator();
-}

+ 0 - 21
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/EmptyRingException.php

@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster\Distributor;
-
-/**
- * Exception class that identifies empty rings.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class EmptyRingException extends \Exception
-{
-}

+ 0 - 270
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/HashRing.php

@@ -1,270 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster\Distributor;
-
-use Predis\Cluster\Hash\HashGeneratorInterface;
-
-/**
- * This class implements an hashring-based distributor that uses the same
- * algorithm of memcache to distribute keys in a cluster using client-side
- * sharding.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- * @author Lorenzo Castelli <lcastelli@gmail.com>
- */
-class HashRing implements DistributorInterface, HashGeneratorInterface
-{
-    const DEFAULT_REPLICAS = 128;
-    const DEFAULT_WEIGHT = 100;
-
-    private $ring;
-    private $ringKeys;
-    private $ringKeysCount;
-    private $replicas;
-    private $nodeHashCallback;
-    private $nodes = array();
-
-    /**
-     * @param int   $replicas         Number of replicas in the ring.
-     * @param mixed $nodeHashCallback Callback returning a string used to calculate the hash of nodes.
-     */
-    public function __construct($replicas = self::DEFAULT_REPLICAS, $nodeHashCallback = null)
-    {
-        $this->replicas = $replicas;
-        $this->nodeHashCallback = $nodeHashCallback;
-    }
-
-    /**
-     * Adds a node to the ring with an optional weight.
-     *
-     * @param mixed $node   Node object.
-     * @param int   $weight Weight for the node.
-     */
-    public function add($node, $weight = null)
-    {
-        // In case of collisions in the hashes of the nodes, the node added
-        // last wins, thus the order in which nodes are added is significant.
-        $this->nodes[] = array(
-            'object' => $node,
-            'weight' => (int) $weight ?: $this::DEFAULT_WEIGHT,
-        );
-
-        $this->reset();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function remove($node)
-    {
-        // A node is removed by resetting the ring so that it's recreated from
-        // scratch, in order to reassign possible hashes with collisions to the
-        // right node according to the order in which they were added in the
-        // first place.
-        for ($i = 0; $i < count($this->nodes); ++$i) {
-            if ($this->nodes[$i]['object'] === $node) {
-                array_splice($this->nodes, $i, 1);
-                $this->reset();
-
-                break;
-            }
-        }
-    }
-
-    /**
-     * Resets the distributor.
-     */
-    private function reset()
-    {
-        unset(
-            $this->ring,
-            $this->ringKeys,
-            $this->ringKeysCount
-        );
-    }
-
-    /**
-     * Returns the initialization status of the distributor.
-     *
-     * @return bool
-     */
-    private function isInitialized()
-    {
-        return isset($this->ringKeys);
-    }
-
-    /**
-     * Calculates the total weight of all the nodes in the distributor.
-     *
-     * @return int
-     */
-    private function computeTotalWeight()
-    {
-        $totalWeight = 0;
-
-        foreach ($this->nodes as $node) {
-            $totalWeight += $node['weight'];
-        }
-
-        return $totalWeight;
-    }
-
-    /**
-     * Initializes the distributor.
-     */
-    private function initialize()
-    {
-        if ($this->isInitialized()) {
-            return;
-        }
-
-        if (!$this->nodes) {
-            throw new EmptyRingException('Cannot initialize an empty hashring.');
-        }
-
-        $this->ring = array();
-        $totalWeight = $this->computeTotalWeight();
-        $nodesCount = count($this->nodes);
-
-        foreach ($this->nodes as $node) {
-            $weightRatio = $node['weight'] / $totalWeight;
-            $this->addNodeToRing($this->ring, $node, $nodesCount, $this->replicas, $weightRatio);
-        }
-
-        ksort($this->ring, SORT_NUMERIC);
-        $this->ringKeys = array_keys($this->ring);
-        $this->ringKeysCount = count($this->ringKeys);
-    }
-
-    /**
-     * Implements the logic needed to add a node to the hashring.
-     *
-     * @param array $ring        Source hashring.
-     * @param mixed $node        Node object to be added.
-     * @param int   $totalNodes  Total number of nodes.
-     * @param int   $replicas    Number of replicas in the ring.
-     * @param float $weightRatio Weight ratio for the node.
-     */
-    protected function addNodeToRing(&$ring, $node, $totalNodes, $replicas, $weightRatio)
-    {
-        $nodeObject = $node['object'];
-        $nodeHash = $this->getNodeHash($nodeObject);
-        $replicas = (int) round($weightRatio * $totalNodes * $replicas);
-
-        for ($i = 0; $i < $replicas; ++$i) {
-            $key = crc32("$nodeHash:$i");
-            $ring[$key] = $nodeObject;
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function getNodeHash($nodeObject)
-    {
-        if (!isset($this->nodeHashCallback)) {
-            return (string) $nodeObject;
-        }
-
-        return call_user_func($this->nodeHashCallback, $nodeObject);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function hash($value)
-    {
-        return crc32($value);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getByHash($hash)
-    {
-        return $this->ring[$this->getSlot($hash)];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getBySlot($slot)
-    {
-        $this->initialize();
-
-        if (isset($this->ring[$slot])) {
-            return $this->ring[$slot];
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getSlot($hash)
-    {
-        $this->initialize();
-
-        $ringKeys = $this->ringKeys;
-        $upper = $this->ringKeysCount - 1;
-        $lower = 0;
-
-        while ($lower <= $upper) {
-            $index = ($lower + $upper) >> 1;
-            $item = $ringKeys[$index];
-
-            if ($item > $hash) {
-                $upper = $index - 1;
-            } elseif ($item < $hash) {
-                $lower = $index + 1;
-            } else {
-                return $item;
-            }
-        }
-
-        return $ringKeys[$this->wrapAroundStrategy($upper, $lower, $this->ringKeysCount)];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function get($value)
-    {
-        $hash = $this->hash($value);
-        $node = $this->getByHash($hash);
-
-        return $node;
-    }
-
-    /**
-     * Implements a strategy to deal with wrap-around errors during binary searches.
-     *
-     * @param int $upper
-     * @param int $lower
-     * @param int $ringKeysCount
-     *
-     * @return int
-     */
-    protected function wrapAroundStrategy($upper, $lower, $ringKeysCount)
-    {
-        // Binary search for the last item in ringkeys with a value less or
-        // equal to the key. If no such item exists, return the last item.
-        return $upper >= 0 ? $upper : $ringKeysCount - 1;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getHashGenerator()
-    {
-        return $this;
-    }
-}

+ 0 - 71
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Distributor/KetamaRing.php

@@ -1,71 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster\Distributor;
-
-/**
- * This class implements an hashring-based distributor that uses the same
- * algorithm of libketama to distribute keys in a cluster using client-side
- * sharding.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- * @author Lorenzo Castelli <lcastelli@gmail.com>
- */
-class KetamaRing extends HashRing
-{
-    const DEFAULT_REPLICAS = 160;
-
-    /**
-     * @param mixed $nodeHashCallback Callback returning a string used to calculate the hash of nodes.
-     */
-    public function __construct($nodeHashCallback = null)
-    {
-        parent::__construct($this::DEFAULT_REPLICAS, $nodeHashCallback);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function addNodeToRing(&$ring, $node, $totalNodes, $replicas, $weightRatio)
-    {
-        $nodeObject = $node['object'];
-        $nodeHash = $this->getNodeHash($nodeObject);
-        $replicas = (int) floor($weightRatio * $totalNodes * ($replicas / 4));
-
-        for ($i = 0; $i < $replicas; ++$i) {
-            $unpackedDigest = unpack('V4', md5("$nodeHash-$i", true));
-
-            foreach ($unpackedDigest as $key) {
-                $ring[$key] = $nodeObject;
-            }
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function hash($value)
-    {
-        $hash = unpack('V', md5($value, true));
-
-        return $hash[1];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function wrapAroundStrategy($upper, $lower, $ringKeysCount)
-    {
-        // Binary search for the first item in ringkeys with a value greater
-        // or equal to the key. If no such item exists, return the first item.
-        return $lower < $ringKeysCount ? $lower : 0;
-    }
-}

+ 0 - 72
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Hash/CRC16.php

@@ -1,72 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster\Hash;
-
-/**
- * Hash generator implementing the CRC-CCITT-16 algorithm used by redis-cluster.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class CRC16 implements HashGeneratorInterface
-{
-    private static $CCITT_16 = array(
-        0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
-        0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
-        0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
-        0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
-        0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
-        0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
-        0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
-        0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
-        0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
-        0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
-        0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
-        0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
-        0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
-        0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
-        0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
-        0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
-        0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
-        0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
-        0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
-        0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
-        0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
-        0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
-        0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
-        0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
-        0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
-        0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
-        0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
-        0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
-        0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
-        0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
-        0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
-        0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0,
-    );
-
-    /**
-     * {@inheritdoc}
-     */
-    public function hash($value)
-    {
-        // CRC-CCITT-16 algorithm
-        $crc = 0;
-        $CCITT_16 = self::$CCITT_16;
-        $strlen = strlen($value);
-
-        for ($i = 0; $i < $strlen; ++$i) {
-            $crc = (($crc << 8) ^ $CCITT_16[($crc >> 8) ^ ord($value[$i])]) & 0xFFFF;
-        }
-
-        return $crc;
-    }
-}

+ 0 - 30
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/Hash/HashGeneratorInterface.php

@@ -1,30 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster\Hash;
-
-/**
- * An hash generator implements the logic used to calculate the hash of a key to
- * distribute operations among Redis nodes.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-interface HashGeneratorInterface
-{
-    /**
-     * Generates an hash from a string to be used for distribution.
-     *
-     * @param string $value String value.
-     *
-     * @return int
-     */
-    public function hash($value);
-}

+ 0 - 79
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/PredisStrategy.php

@@ -1,79 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster;
-
-use Predis\Cluster\Distributor\DistributorInterface;
-use Predis\Cluster\Distributor\HashRing;
-
-/**
- * Default cluster strategy used by Predis to handle client-side sharding.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class PredisStrategy extends ClusterStrategy
-{
-    protected $distributor;
-
-    /**
-     * @param DistributorInterface $distributor Optional distributor instance.
-     */
-    public function __construct(DistributorInterface $distributor = null)
-    {
-        parent::__construct();
-
-        $this->distributor = $distributor ?: new HashRing();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getSlotByKey($key)
-    {
-        $key = $this->extractKeyTag($key);
-        $hash = $this->distributor->hash($key);
-        $slot = $this->distributor->getSlot($hash);
-
-        return $slot;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function checkSameSlotForKeys(array $keys)
-    {
-        if (!$count = count($keys)) {
-            return false;
-        }
-
-        $currentKey = $this->extractKeyTag($keys[0]);
-
-        for ($i = 1; $i < $count; ++$i) {
-            $nextKey = $this->extractKeyTag($keys[$i]);
-
-            if ($currentKey !== $nextKey) {
-                return false;
-            }
-
-            $currentKey = $nextKey;
-        }
-
-        return true;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDistributor()
-    {
-        return $this->distributor;
-    }
-}

+ 0 - 58
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/RedisStrategy.php

@@ -1,58 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster;
-
-use Predis\Cluster\Hash\CRC16;
-use Predis\Cluster\Hash\HashGeneratorInterface;
-use Predis\NotSupportedException;
-
-/**
- * Default class used by Predis to calculate hashes out of keys of
- * commands supported by redis-cluster.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-class RedisStrategy extends ClusterStrategy
-{
-    protected $hashGenerator;
-
-    /**
-     * @param HashGeneratorInterface $hashGenerator Hash generator instance.
-     */
-    public function __construct(HashGeneratorInterface $hashGenerator = null)
-    {
-        parent::__construct();
-
-        $this->hashGenerator = $hashGenerator ?: new CRC16();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getSlotByKey($key)
-    {
-        $key = $this->extractKeyTag($key);
-        $slot = $this->hashGenerator->hash($key) & 0x3FFF;
-
-        return $slot;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getDistributor()
-    {
-        throw new NotSupportedException(
-            'This cluster strategy does not provide an external distributor'
-        );
-    }
-}

+ 0 - 53
Gameserver/Public/phpRedisAdmin/predis/src/Cluster/StrategyInterface.php

@@ -1,53 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Cluster;
-
-use Predis\Cluster\Distributor\DistributorInterface;
-use Predis\Command\CommandInterface;
-
-/**
- * Interface for classes defining the strategy used to calculate an hash out of
- * keys extracted from supported commands.
- *
- * This is mostly useful to support clustering via client-side sharding.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-interface StrategyInterface
-{
-    /**
-     * Returns a slot for the given command used for clustering distribution or
-     * NULL when this is not possible.
-     *
-     * @param CommandInterface $command Command instance.
-     *
-     * @return int
-     */
-    public function getSlot(CommandInterface $command);
-
-    /**
-     * Returns a slot for the given key used for clustering distribution or NULL
-     * when this is not possible.
-     *
-     * @param string $key Key string.
-     *
-     * @return int
-     */
-    public function getSlotByKey($key);
-
-    /**
-     * Returns a distributor instance to be used by the cluster.
-     *
-     * @return DistributorInterface
-     */
-    public function getDistributor();
-}

+ 0 - 191
Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/CursorBasedIterator.php

@@ -1,191 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Collection\Iterator;
-
-use Predis\ClientInterface;
-use Predis\NotSupportedException;
-
-/**
- * Provides the base implementation for a fully-rewindable PHP iterator that can
- * incrementally iterate over cursor-based collections stored on Redis using the
- * commands in the `SCAN` family.
- *
- * Given their incremental nature with multiple fetches, these kind of iterators
- * offer limited guarantees about the returned elements because the collection
- * can change several times during the iteration process.
- *
- * @see http://redis.io/commands/scan
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- */
-abstract class CursorBasedIterator implements \Iterator
-{
-    protected $client;
-    protected $match;
-    protected $count;
-
-    protected $valid;
-    protected $fetchmore;
-    protected $elements;
-    protected $cursor;
-    protected $position;
-    protected $current;
-
-    /**
-     * @param ClientInterface $client Client connected to Redis.
-     * @param string          $match  Pattern to match during the server-side iteration.
-     * @param int             $count  Hint used by Redis to compute the number of results per iteration.
-     */
-    public function __construct(ClientInterface $client, $match = null, $count = null)
-    {
-        $this->client = $client;
-        $this->match = $match;
-        $this->count = $count;
-
-        $this->reset();
-    }
-
-    /**
-     * Ensures that the client supports the specified Redis command required to
-     * fetch elements from the server to perform the iteration.
-     *
-     * @param ClientInterface $client    Client connected to Redis.
-     * @param string          $commandID Command ID.
-     *
-     * @throws NotSupportedException
-     */
-    protected function requiredCommand(ClientInterface $client, $commandID)
-    {
-        if (!$client->getProfile()->supportsCommand($commandID)) {
-            throw new NotSupportedException("The current profile does not support '$commandID'.");
-        }
-    }
-
-    /**
-     * Resets the inner state of the iterator.
-     */
-    protected function reset()
-    {
-        $this->valid = true;
-        $this->fetchmore = true;
-        $this->elements = array();
-        $this->cursor = 0;
-        $this->position = -1;
-        $this->current = null;
-    }
-
-    /**
-     * Returns an array of options for the `SCAN` command.
-     *
-     * @return array
-     */
-    protected function getScanOptions()
-    {
-        $options = array();
-
-        if (strlen($this->match) > 0) {
-            $options['MATCH'] = $this->match;
-        }
-
-        if ($this->count > 0) {
-            $options['COUNT'] = $this->count;
-        }
-
-        return $options;
-    }
-
-    /**
-     * Fetches a new set of elements from the remote collection, effectively
-     * advancing the iteration process.
-     *
-     * @return array
-     */
-    abstract protected function executeCommand();
-
-    /**
-     * Populates the local buffer of elements fetched from the server during
-     * the iteration.
-     */
-    protected function fetch()
-    {
-        list($cursor, $elements) = $this->executeCommand();
-
-        if (!$cursor) {
-            $this->fetchmore = false;
-        }
-
-        $this->cursor = $cursor;
-        $this->elements = $elements;
-    }
-
-    /**
-     * Extracts next values for key() and current().
-     */
-    protected function extractNext()
-    {
-        ++$this->position;
-        $this->current = array_shift($this->elements);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rewind()
-    {
-        $this->reset();
-        $this->next();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function current()
-    {
-        return $this->current;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function key()
-    {
-        return $this->position;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function next()
-    {
-        tryFetch: {
-            if (!$this->elements && $this->fetchmore) {
-                $this->fetch();
-            }
-
-            if ($this->elements) {
-                $this->extractNext();
-            } elseif ($this->cursor) {
-                goto tryFetch;
-            } else {
-                $this->valid = false;
-            }
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function valid()
-    {
-        return $this->valid;
-    }
-}

+ 0 - 60
Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/HashKey.php

@@ -1,60 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Collection\Iterator;
-
-use Predis\ClientInterface;
-
-/**
- * Abstracts the iteration of fields and values of an hash by leveraging the
- * HSCAN command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- *
- * @link http://redis.io/commands/scan
- */
-class HashKey extends CursorBasedIterator
-{
-    protected $key;
-
-    /**
-     * {@inheritdoc}
-     */
-    public function __construct(ClientInterface $client, $key, $match = null, $count = null)
-    {
-        $this->requiredCommand($client, 'HSCAN');
-
-        parent::__construct($client, $match, $count);
-
-        $this->key = $key;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function executeCommand()
-    {
-        return $this->client->hscan($this->key, $this->cursor, $this->getScanOptions());
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function extractNext()
-    {
-        if ($kv = each($this->elements)) {
-            $this->position = $kv[0];
-            $this->current = $kv[1];
-
-            unset($this->elements[$this->position]);
-        }
-    }
-}

+ 0 - 43
Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/Keyspace.php

@@ -1,43 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Collection\Iterator;
-
-use Predis\ClientInterface;
-
-/**
- * Abstracts the iteration of the keyspace on a Redis instance by leveraging the
- * SCAN command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- *
- * @link http://redis.io/commands/scan
- */
-class Keyspace extends CursorBasedIterator
-{
-    /**
-     * {@inheritdoc}
-     */
-    public function __construct(ClientInterface $client, $match = null, $count = null)
-    {
-        $this->requiredCommand($client, 'SCAN');
-
-        parent::__construct($client, $match, $count);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function executeCommand()
-    {
-        return $this->client->scan($this->cursor, $this->getScanOptions());
-    }
-}

+ 0 - 176
Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/ListKey.php

@@ -1,176 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Collection\Iterator;
-
-use Predis\ClientInterface;
-use Predis\NotSupportedException;
-
-/**
- * Abstracts the iteration of items stored in a list by leveraging the LRANGE
- * command wrapped in a fully-rewindable PHP iterator.
- *
- * This iterator tries to emulate the behaviour of cursor-based iterators based
- * on the SCAN-family of commands introduced in Redis <= 2.8, meaning that due
- * to its incremental nature with multiple fetches it can only offer limited
- * guarantees on the returned elements because the collection can change several
- * times (trimmed, deleted, overwritten) during the iteration process.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- *
- * @link http://redis.io/commands/lrange
- */
-class ListKey implements \Iterator
-{
-    protected $client;
-    protected $count;
-    protected $key;
-
-    protected $valid;
-    protected $fetchmore;
-    protected $elements;
-    protected $position;
-    protected $current;
-
-    /**
-     * @param ClientInterface $client Client connected to Redis.
-     * @param string          $key    Redis list key.
-     * @param int             $count  Number of items retrieved on each fetch operation.
-     *
-     * @throws \InvalidArgumentException
-     */
-    public function __construct(ClientInterface $client, $key, $count = 10)
-    {
-        $this->requiredCommand($client, 'LRANGE');
-
-        if ((false === $count = filter_var($count, FILTER_VALIDATE_INT)) || $count < 0) {
-            throw new \InvalidArgumentException('The $count argument must be a positive integer.');
-        }
-
-        $this->client = $client;
-        $this->key = $key;
-        $this->count = $count;
-
-        $this->reset();
-    }
-
-    /**
-     * Ensures that the client instance supports the specified Redis command
-     * required to fetch elements from the server to perform the iteration.
-     *
-     * @param ClientInterface $client    Client connected to Redis.
-     * @param string          $commandID Command ID.
-     *
-     * @throws NotSupportedException
-     */
-    protected function requiredCommand(ClientInterface $client, $commandID)
-    {
-        if (!$client->getProfile()->supportsCommand($commandID)) {
-            throw new NotSupportedException("The current profile does not support '$commandID'.");
-        }
-    }
-
-    /**
-     * Resets the inner state of the iterator.
-     */
-    protected function reset()
-    {
-        $this->valid = true;
-        $this->fetchmore = true;
-        $this->elements = array();
-        $this->position = -1;
-        $this->current = null;
-    }
-
-    /**
-     * Fetches a new set of elements from the remote collection, effectively
-     * advancing the iteration process.
-     *
-     * @return array
-     */
-    protected function executeCommand()
-    {
-        return $this->client->lrange($this->key, $this->position + 1, $this->position + $this->count);
-    }
-
-    /**
-     * Populates the local buffer of elements fetched from the server during the
-     * iteration.
-     */
-    protected function fetch()
-    {
-        $elements = $this->executeCommand();
-
-        if (count($elements) < $this->count) {
-            $this->fetchmore = false;
-        }
-
-        $this->elements = $elements;
-    }
-
-    /**
-     * Extracts next values for key() and current().
-     */
-    protected function extractNext()
-    {
-        ++$this->position;
-        $this->current = array_shift($this->elements);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function rewind()
-    {
-        $this->reset();
-        $this->next();
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function current()
-    {
-        return $this->current;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function key()
-    {
-        return $this->position;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function next()
-    {
-        if (!$this->elements && $this->fetchmore) {
-            $this->fetch();
-        }
-
-        if ($this->elements) {
-            $this->extractNext();
-        } else {
-            $this->valid = false;
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function valid()
-    {
-        return $this->valid;
-    }
-}

+ 0 - 47
Gameserver/Public/phpRedisAdmin/predis/src/Collection/Iterator/SetKey.php

@@ -1,47 +0,0 @@
-<?php
-
-/*
- * This file is part of the Predis package.
- *
- * (c) Daniele Alessandri <suppakilla@gmail.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Predis\Collection\Iterator;
-
-use Predis\ClientInterface;
-
-/**
- * Abstracts the iteration of members stored in a set by leveraging the SSCAN
- * command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator.
- *
- * @author Daniele Alessandri <suppakilla@gmail.com>
- *
- * @link http://redis.io/commands/scan
- */
-class SetKey extends CursorBasedIterator
-{
-    protected $key;
-
-    /**
-     * {@inheritdoc}
-     */
-    public function __construct(ClientInterface $client, $key, $match = null, $count = null)
-    {
-        $this->requiredCommand($client, 'SSCAN');
-
-        parent::__construct($client, $match, $count);
-
-        $this->key = $key;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    protected function executeCommand()
-    {
-        return $this->client->sscan($this->key, $this->cursor, $this->getScanOptions());
-    }
-}

Some files were not shown because too many files changed in this diff