RelayProxyTrait.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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('relay'), '0.8.1', '>=')) {
  12. /**
  13. * @internal
  14. */
  15. trait RelayProxyTrait
  16. {
  17. public function jsonArrAppend($key, $value_or_array, $path = null): \Relay\Relay|array|false
  18. {
  19. return $this->initializeLazyObject()->jsonArrAppend(...\func_get_args());
  20. }
  21. public function jsonArrIndex($key, $path, $value, $start = 0, $stop = -1): \Relay\Relay|array|false
  22. {
  23. return $this->initializeLazyObject()->jsonArrIndex(...\func_get_args());
  24. }
  25. public function jsonArrInsert($key, $path, $index, $value, ...$other_values): \Relay\Relay|array|false
  26. {
  27. return $this->initializeLazyObject()->jsonArrInsert(...\func_get_args());
  28. }
  29. public function jsonArrLen($key, $path = null): \Relay\Relay|array|false
  30. {
  31. return $this->initializeLazyObject()->jsonArrLen(...\func_get_args());
  32. }
  33. public function jsonArrPop($key, $path = null, $index = -1): \Relay\Relay|array|false
  34. {
  35. return $this->initializeLazyObject()->jsonArrPop(...\func_get_args());
  36. }
  37. public function jsonArrTrim($key, $path, $start, $stop): \Relay\Relay|array|false
  38. {
  39. return $this->initializeLazyObject()->jsonArrTrim(...\func_get_args());
  40. }
  41. public function jsonClear($key, $path = null): \Relay\Relay|false|int
  42. {
  43. return $this->initializeLazyObject()->jsonClear(...\func_get_args());
  44. }
  45. public function jsonDebug($command, $key, $path = null): \Relay\Relay|false|int
  46. {
  47. return $this->initializeLazyObject()->jsonDebug(...\func_get_args());
  48. }
  49. public function jsonDel($key, $path = null): \Relay\Relay|false|int
  50. {
  51. return $this->initializeLazyObject()->jsonDel(...\func_get_args());
  52. }
  53. public function jsonForget($key, $path = null): \Relay\Relay|false|int
  54. {
  55. return $this->initializeLazyObject()->jsonForget(...\func_get_args());
  56. }
  57. public function jsonGet($key, $options = [], ...$paths): mixed
  58. {
  59. return $this->initializeLazyObject()->jsonGet(...\func_get_args());
  60. }
  61. public function jsonMerge($key, $path, $value): \Relay\Relay|bool
  62. {
  63. return $this->initializeLazyObject()->jsonMerge(...\func_get_args());
  64. }
  65. public function jsonMget($key_or_array, $path): \Relay\Relay|array|false
  66. {
  67. return $this->initializeLazyObject()->jsonMget(...\func_get_args());
  68. }
  69. public function jsonMset($key, $path, $value, ...$other_triples): \Relay\Relay|bool
  70. {
  71. return $this->initializeLazyObject()->jsonMset(...\func_get_args());
  72. }
  73. public function jsonNumIncrBy($key, $path, $value): \Relay\Relay|array|false
  74. {
  75. return $this->initializeLazyObject()->jsonNumIncrBy(...\func_get_args());
  76. }
  77. public function jsonNumMultBy($key, $path, $value): \Relay\Relay|array|false
  78. {
  79. return $this->initializeLazyObject()->jsonNumMultBy(...\func_get_args());
  80. }
  81. public function jsonObjKeys($key, $path = null): \Relay\Relay|array|false
  82. {
  83. return $this->initializeLazyObject()->jsonObjKeys(...\func_get_args());
  84. }
  85. public function jsonObjLen($key, $path = null): \Relay\Relay|array|false
  86. {
  87. return $this->initializeLazyObject()->jsonObjLen(...\func_get_args());
  88. }
  89. public function jsonResp($key, $path = null): \Relay\Relay|array|false|int|string
  90. {
  91. return $this->initializeLazyObject()->jsonResp(...\func_get_args());
  92. }
  93. public function jsonSet($key, $path, $value, $condition = null): \Relay\Relay|bool
  94. {
  95. return $this->initializeLazyObject()->jsonSet(...\func_get_args());
  96. }
  97. public function jsonStrAppend($key, $value, $path = null): \Relay\Relay|array|false
  98. {
  99. return $this->initializeLazyObject()->jsonStrAppend(...\func_get_args());
  100. }
  101. public function jsonStrLen($key, $path = null): \Relay\Relay|array|false
  102. {
  103. return $this->initializeLazyObject()->jsonStrLen(...\func_get_args());
  104. }
  105. public function jsonToggle($key, $path): \Relay\Relay|array|false
  106. {
  107. return $this->initializeLazyObject()->jsonToggle(...\func_get_args());
  108. }
  109. public function jsonType($key, $path = null): \Relay\Relay|array|false
  110. {
  111. return $this->initializeLazyObject()->jsonType(...\func_get_args());
  112. }
  113. }
  114. } else {
  115. /**
  116. * @internal
  117. */
  118. trait RelayProxyTrait
  119. {
  120. }
  121. }