@@ -115,8 +115,8 @@ public function name(): string
115115 */
116116 public function get (string $ id , ?GetOptions $ options = null ): GetResult
117117 {
118- $ response = Extension \ documentGet(
119- $ this ->core ,
118+ $ function = COUCHBASE_EXTENSION_NAMESPACE . "\\ documentGet " ;
119+ $ response = $ function ( $ this ->core ,
120120 $ this ->bucketName ,
121121 $ this ->scopeName ,
122122 $ this ->name ,
@@ -139,7 +139,8 @@ public function get(string $id, ?GetOptions $options = null): GetResult
139139 */
140140 public function exists (string $ id , ?ExistsOptions $ options = null ): ExistsResult
141141 {
142- $ response = Extension \documentExists (
142+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentExists ' ;
143+ $ response = $ function (
143144 $ this ->core ,
144145 $ this ->bucketName ,
145146 $ this ->scopeName ,
@@ -166,7 +167,8 @@ public function exists(string $id, ?ExistsOptions $options = null): ExistsResult
166167 */
167168 public function getAndLock (string $ id , int $ lockTimeSeconds , ?GetAndLockOptions $ options = null ): GetResult
168169 {
169- $ response = Extension \documentGetAndLock (
170+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentGetAndLock ' ;
171+ $ response = $ function (
170172 $ this ->core ,
171173 $ this ->bucketName ,
172174 $ this ->scopeName ,
@@ -198,7 +200,8 @@ public function getAndTouch(string $id, $expiry, ?GetAndTouchOptions $options =
198200 } else {
199201 $ expirySeconds = (int )$ expiry ;
200202 }
201- $ response = Extension \documentGetAndTouch (
203+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentGetAndTouch ' ;
204+ $ response = $ function (
202205 $ this ->core ,
203206 $ this ->bucketName ,
204207 $ this ->scopeName ,
@@ -225,7 +228,8 @@ public function getAndTouch(string $id, $expiry, ?GetAndTouchOptions $options =
225228 */
226229 public function getAnyReplica (string $ id , ?GetAnyReplicaOptions $ options = null ): GetReplicaResult
227230 {
228- $ response = Extension \documentGetAnyReplica (
231+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentGetAnyReplica ' ;
232+ $ response = $ function (
229233 $ this ->core ,
230234 $ this ->bucketName ,
231235 $ this ->scopeName ,
@@ -250,7 +254,8 @@ public function getAnyReplica(string $id, ?GetAnyReplicaOptions $options = null)
250254 */
251255 public function getAllReplicas (string $ id , ?GetAllReplicasOptions $ options = null ): array
252256 {
253- $ responses = Extension \documentGetAllReplicas (
257+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentGetAllReplicas ' ;
258+ $ responses = $ function (
254259 $ this ->core ,
255260 $ this ->bucketName ,
256261 $ this ->scopeName ,
@@ -281,7 +286,8 @@ function (array $response) use ($options) {
281286 public function upsert (string $ id , $ value , ?UpsertOptions $ options = null ): MutationResult
282287 {
283288 $ encoded = UpsertOptions::encodeDocument ($ options , $ value );
284- $ response = Extension \documentUpsert (
289+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentUpsert ' ;
290+ $ response = $ function (
285291 $ this ->core ,
286292 $ this ->bucketName ,
287293 $ this ->scopeName ,
@@ -310,7 +316,8 @@ public function upsert(string $id, $value, ?UpsertOptions $options = null): Muta
310316 public function insert (string $ id , $ value , ?InsertOptions $ options = null ): MutationResult
311317 {
312318 $ encoded = InsertOptions::encodeDocument ($ options , $ value );
313- $ response = Extension \documentInsert (
319+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentInsert ' ;
320+ $ response = $ function (
314321 $ this ->core ,
315322 $ this ->bucketName ,
316323 $ this ->scopeName ,
@@ -340,7 +347,8 @@ public function insert(string $id, $value, ?InsertOptions $options = null): Muta
340347 public function replace (string $ id , $ value , ?ReplaceOptions $ options = null ): MutationResult
341348 {
342349 $ encoded = ReplaceOptions::encodeDocument ($ options , $ value );
343- $ response = Extension \documentReplace (
350+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentReplace ' ;
351+ $ response = $ function (
344352 $ this ->core ,
345353 $ this ->bucketName ,
346354 $ this ->scopeName ,
@@ -368,7 +376,8 @@ public function replace(string $id, $value, ?ReplaceOptions $options = null): Mu
368376 */
369377 public function remove (string $ id , ?RemoveOptions $ options = null ): MutationResult
370378 {
371- $ response = Extension \documentRemove (
379+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentRemove ' ;
380+ $ response = $ function (
372381 $ this ->core ,
373382 $ this ->bucketName ,
374383 $ this ->scopeName ,
@@ -396,7 +405,8 @@ public function remove(string $id, ?RemoveOptions $options = null): MutationResu
396405 */
397406 public function unlock (string $ id , string $ cas , ?UnlockOptions $ options = null ): Result
398407 {
399- $ response = Extension \documentUnlock (
408+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentUnlock ' ;
409+ $ response = $ function (
400410 $ this ->core ,
401411 $ this ->bucketName ,
402412 $ this ->scopeName ,
@@ -428,7 +438,8 @@ public function touch(string $id, $expiry, ?TouchOptions $options = null): Mutat
428438 } else {
429439 $ expirySeconds = (int )$ expiry ;
430440 }
431- $ response = Extension \documentTouch (
441+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentTouch ' ;
442+ $ response = $ function (
432443 $ this ->core ,
433444 $ this ->bucketName ,
434445 $ this ->scopeName ,
@@ -464,7 +475,8 @@ function (LookupInSpec $item) {
464475 if ($ options != null && $ options ->needToFetchExpiry ()) {
465476 $ encoded [] = ['opcode ' => 'get ' , 'isXattr ' => true , 'path ' => LookupInMacro::EXPIRY_TIME ];
466477 }
467- $ response = Extension \documentLookupIn (
478+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentLookupIn ' ;
479+ $ response = $ function (
468480 $ this ->core ,
469481 $ this ->bucketName ,
470482 $ this ->scopeName ,
@@ -500,7 +512,8 @@ function (LookupInSpec $item) {
500512 if ($ options != null && $ options ->needToFetchExpiry ()) {
501513 $ encoded [] = ['opcode ' => 'get ' , 'isXattr ' => true , 'path ' => LookupInMacro::EXPIRY_TIME ];
502514 }
503- $ response = Extension \documentLookupInAnyReplica (
515+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentLookupInAnyReplica ' ;
516+ $ response = $ function (
504517 $ this ->core ,
505518 $ this ->bucketName ,
506519 $ this ->scopeName ,
@@ -537,7 +550,8 @@ function (LookupInSpec $item) {
537550 if ($ options != null && $ options ->needToFetchExpiry ()) {
538551 $ encoded [] = ['opcode ' => 'get ' , 'isXattr ' => true , 'path ' => LookupInMacro::EXPIRY_TIME ];
539552 }
540- $ responses = Extension \documentLookupInAllReplicas (
553+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentLookupInAllReplicas ' ;
554+ $ responses = $ function (
541555 $ this ->core ,
542556 $ this ->bucketName ,
543557 $ this ->scopeName ,
@@ -576,7 +590,8 @@ function (MutateInSpec $item) use ($options) {
576590 },
577591 $ specs
578592 );
579- $ response = Extension \documentMutateIn (
593+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentMutateIn ' ;
594+ $ response = $ function (
580595 $ this ->core ,
581596 $ this ->bucketName ,
582597 $ this ->scopeName ,
@@ -600,7 +615,8 @@ function (MutateInSpec $item) use ($options) {
600615 */
601616 public function getMulti (array $ ids , ?GetOptions $ options = null ): array
602617 {
603- $ responses = Extension \documentGetMulti (
618+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentGetMulti ' ;
619+ $ responses = $ function (
604620 $ this ->core ,
605621 $ this ->bucketName ,
606622 $ this ->scopeName ,
@@ -666,7 +682,8 @@ public function scan(ScanType $scanType, ?ScanOptions $options = null): ScanResu
666682 */
667683 public function removeMulti (array $ entries , ?RemoveOptions $ options = null ): array
668684 {
669- $ responses = Extension \documentRemoveMulti (
685+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentRemoveMulti ' ;
686+ $ responses = $ function (
670687 $ this ->core ,
671688 $ this ->bucketName ,
672689 $ this ->scopeName ,
@@ -712,7 +729,8 @@ function (array $entry) use ($options) {
712729 },
713730 $ entries
714731 );
715- $ responses = Extension \documentUpsertMulti (
732+ $ function = COUCHBASE_EXTENSION_NAMESPACE . '\\documentUpsertMulti ' ;
733+ $ responses = $ function (
716734 $ this ->core ,
717735 $ this ->bucketName ,
718736 $ this ->scopeName ,
0 commit comments