Redis63ProxyTrait.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Cache\Traits;
  11. if (version_compare(phpversion('redis'), '6.3.0', '>=')) {
  12. /**
  13. * @internal
  14. */
  15. trait Redis63ProxyTrait
  16. {
  17. public function delifeq($key, $value): \Redis|int|false
  18. {
  19. return $this->initializeLazyObject()->delifeq(...\func_get_args());
  20. }
  21. public function hexpire($key, $ttl, $fields, $mode = null): \Redis|array|false
  22. {
  23. return $this->initializeLazyObject()->hexpire(...\func_get_args());
  24. }
  25. public function hexpireat($key, $time, $fields, $mode = null): \Redis|array|false
  26. {
  27. return $this->initializeLazyObject()->hexpireat(...\func_get_args());
  28. }
  29. public function hexpiretime($key, $fields): \Redis|array|false
  30. {
  31. return $this->initializeLazyObject()->hexpiretime(...\func_get_args());
  32. }
  33. public function hgetdel($key, $fields): \Redis|array|false
  34. {
  35. return $this->initializeLazyObject()->hgetdel(...\func_get_args());
  36. }
  37. public function hgetex($key, $fields, $expiry = null): \Redis|array|false
  38. {
  39. return $this->initializeLazyObject()->hgetex(...\func_get_args());
  40. }
  41. public function hGetWithMeta($key, $member): mixed
  42. {
  43. return $this->initializeLazyObject()->hGetWithMeta(...\func_get_args());
  44. }
  45. public function hpersist($key, $fields): \Redis|array|false
  46. {
  47. return $this->initializeLazyObject()->hpersist(...\func_get_args());
  48. }
  49. public function hpexpire($key, $ttl, $fields, $mode = null): \Redis|array|false
  50. {
  51. return $this->initializeLazyObject()->hpexpire(...\func_get_args());
  52. }
  53. public function hpexpireat($key, $mstime, $fields, $mode = null): \Redis|array|false
  54. {
  55. return $this->initializeLazyObject()->hpexpireat(...\func_get_args());
  56. }
  57. public function hpexpiretime($key, $fields): \Redis|array|false
  58. {
  59. return $this->initializeLazyObject()->hpexpiretime(...\func_get_args());
  60. }
  61. public function hpttl($key, $fields): \Redis|array|false
  62. {
  63. return $this->initializeLazyObject()->hpttl(...\func_get_args());
  64. }
  65. public function hsetex($key, $fields, $expiry = null): \Redis|int|false
  66. {
  67. return $this->initializeLazyObject()->hsetex(...\func_get_args());
  68. }
  69. public function httl($key, $fields): \Redis|array|false
  70. {
  71. return $this->initializeLazyObject()->httl(...\func_get_args());
  72. }
  73. public function vadd($key, $values, $element, $options = null): \Redis|int|false
  74. {
  75. return $this->initializeLazyObject()->vadd(...\func_get_args());
  76. }
  77. public function vcard($key): \Redis|int|false
  78. {
  79. return $this->initializeLazyObject()->vcard(...\func_get_args());
  80. }
  81. public function vdim($key): \Redis|int|false
  82. {
  83. return $this->initializeLazyObject()->vdim(...\func_get_args());
  84. }
  85. public function vemb($key, $member, $raw = false): \Redis|array|false
  86. {
  87. return $this->initializeLazyObject()->vemb(...\func_get_args());
  88. }
  89. public function vgetattr($key, $member, $decode = true): \Redis|array|string|false
  90. {
  91. return $this->initializeLazyObject()->vgetattr(...\func_get_args());
  92. }
  93. public function vinfo($key): \Redis|array|false
  94. {
  95. return $this->initializeLazyObject()->vinfo(...\func_get_args());
  96. }
  97. public function vismember($key, $member): \Redis|bool
  98. {
  99. return $this->initializeLazyObject()->vismember(...\func_get_args());
  100. }
  101. public function vlinks($key, $member, $withscores = false): \Redis|array|false
  102. {
  103. return $this->initializeLazyObject()->vlinks(...\func_get_args());
  104. }
  105. public function vrandmember($key, $count = 0): \Redis|array|string|false
  106. {
  107. return $this->initializeLazyObject()->vrandmember(...\func_get_args());
  108. }
  109. public function vrange($key, $min, $max, $count = -1): \Redis|array|false
  110. {
  111. return $this->initializeLazyObject()->vrange(...\func_get_args());
  112. }
  113. public function vrem($key, $member): \Redis|int|false
  114. {
  115. return $this->initializeLazyObject()->vrem(...\func_get_args());
  116. }
  117. public function vsetattr($key, $member, $attributes): \Redis|int|false
  118. {
  119. return $this->initializeLazyObject()->vsetattr(...\func_get_args());
  120. }
  121. public function vsim($key, $member, $options = null): \Redis|array|false
  122. {
  123. return $this->initializeLazyObject()->vsim(...\func_get_args());
  124. }
  125. }
  126. } else {
  127. /**
  128. * @internal
  129. */
  130. trait Redis63ProxyTrait
  131. {
  132. }
  133. }