FtTrait.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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\Relay;
  11. if (version_compare(phpversion('relay'), '0.9.0', '>=')) {
  12. /**
  13. * @internal
  14. */
  15. trait FtTrait
  16. {
  17. public function ftAggregate($index, $query, $options = null): \Relay\Relay|array|false
  18. {
  19. return $this->initializeLazyObject()->ftAggregate(...\func_get_args());
  20. }
  21. public function ftAliasAdd($index, $alias): \Relay\Relay|bool
  22. {
  23. return $this->initializeLazyObject()->ftAliasAdd(...\func_get_args());
  24. }
  25. public function ftAliasDel($alias): \Relay\Relay|bool
  26. {
  27. return $this->initializeLazyObject()->ftAliasDel(...\func_get_args());
  28. }
  29. public function ftAliasUpdate($index, $alias): \Relay\Relay|bool
  30. {
  31. return $this->initializeLazyObject()->ftAliasUpdate(...\func_get_args());
  32. }
  33. public function ftAlter($index, $schema, $skipinitialscan = false): \Relay\Relay|bool
  34. {
  35. return $this->initializeLazyObject()->ftAlter(...\func_get_args());
  36. }
  37. public function ftConfig($operation, $option, $value = null): \Relay\Relay|array|bool
  38. {
  39. return $this->initializeLazyObject()->ftConfig(...\func_get_args());
  40. }
  41. public function ftCreate($index, $schema, $options = null): \Relay\Relay|bool
  42. {
  43. return $this->initializeLazyObject()->ftCreate(...\func_get_args());
  44. }
  45. public function ftCursor($operation, $index, $cursor, $options = null): \Relay\Relay|array|bool
  46. {
  47. return $this->initializeLazyObject()->ftCursor(...\func_get_args());
  48. }
  49. public function ftDictAdd($dict, $term, ...$other_terms): \Relay\Relay|false|int
  50. {
  51. return $this->initializeLazyObject()->ftDictAdd(...\func_get_args());
  52. }
  53. public function ftDictDel($dict, $term, ...$other_terms): \Relay\Relay|false|int
  54. {
  55. return $this->initializeLazyObject()->ftDictDel(...\func_get_args());
  56. }
  57. public function ftDictDump($dict): \Relay\Relay|array|false
  58. {
  59. return $this->initializeLazyObject()->ftDictDump(...\func_get_args());
  60. }
  61. public function ftDropIndex($index, $dd = false): \Relay\Relay|bool
  62. {
  63. return $this->initializeLazyObject()->ftDropIndex(...\func_get_args());
  64. }
  65. public function ftExplain($index, $query, $dialect = 0): \Relay\Relay|false|string
  66. {
  67. return $this->initializeLazyObject()->ftExplain(...\func_get_args());
  68. }
  69. public function ftExplainCli($index, $query, $dialect = 0): \Relay\Relay|array|false
  70. {
  71. return $this->initializeLazyObject()->ftExplainCli(...\func_get_args());
  72. }
  73. public function ftInfo($index): \Relay\Relay|array|false
  74. {
  75. return $this->initializeLazyObject()->ftInfo(...\func_get_args());
  76. }
  77. public function ftProfile($index, $command, $query, $limited = false): \Relay\Relay|array|false
  78. {
  79. return $this->initializeLazyObject()->ftProfile(...\func_get_args());
  80. }
  81. public function ftSearch($index, $query, $options = null): \Relay\Relay|array|false
  82. {
  83. return $this->initializeLazyObject()->ftSearch(...\func_get_args());
  84. }
  85. public function ftSpellCheck($index, $query, $options = null): \Relay\Relay|array|false
  86. {
  87. return $this->initializeLazyObject()->ftSpellCheck(...\func_get_args());
  88. }
  89. public function ftSynDump($index): \Relay\Relay|array|false
  90. {
  91. return $this->initializeLazyObject()->ftSynDump(...\func_get_args());
  92. }
  93. public function ftSynUpdate($index, $synonym, $term_or_terms, $skipinitialscan = false): \Relay\Relay|bool
  94. {
  95. return $this->initializeLazyObject()->ftSynUpdate(...\func_get_args());
  96. }
  97. public function ftTagVals($index, $tag): \Relay\Relay|array|false
  98. {
  99. return $this->initializeLazyObject()->ftTagVals(...\func_get_args());
  100. }
  101. }
  102. } else {
  103. /**
  104. * @internal
  105. */
  106. trait FtTrait
  107. {
  108. }
  109. }