Skip to content

Commit cc27c6d

Browse files
committed
fix API stubs for managers
Change-Id: I8c25b55a1ca8bcce75beab8839e448a18aed0a83 Reviewed-on: http://review.couchbase.org/122529 Tested-by: Build Bot <[email protected]> Reviewed-by: Sergey Avseyev <[email protected]>
1 parent 4dc1464 commit cc27c6d

File tree

2 files changed

+164
-62
lines changed

2 files changed

+164
-62
lines changed

api/couchbase.php

Lines changed: 163 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,104 @@ public function searchIndexes(): SearchIndexManager
638638
}
639639
}
640640

641+
class BucketSettings
642+
{
643+
public function name(): string
644+
{
645+
}
646+
647+
public function flushEnabled(): bool
648+
{
649+
}
650+
651+
public function ramQuotaMb(): int
652+
{
653+
}
654+
655+
public function numReplicas(): int
656+
{
657+
}
658+
659+
public function replicaIndexes(): bool
660+
{
661+
}
662+
663+
public function bucketType(): string
664+
{
665+
}
666+
667+
public function ejectionMethod(): string
668+
{
669+
}
670+
671+
public function maxTtl(): int
672+
{
673+
}
674+
675+
public function compressionMode(): string
676+
{
677+
}
678+
679+
public function setName(string $name): BucketSettings
680+
{
681+
}
682+
683+
public function enableFlush(bool $enable): BucketSettings
684+
{
685+
}
686+
687+
public function setRamQuotaMb(int $sizeInMb): BucketSettings
688+
{
689+
}
690+
691+
public function setNumReplicas(int $numReplicas): BucketSettings
692+
{
693+
}
694+
695+
public function enableReplicaIndexes(bool $enable): BucketSettings
696+
{
697+
}
698+
699+
public function setBucketType(string $type): BucketSettings
700+
{
701+
}
702+
703+
public function setEjectionMethod(string $method): BucketSettings
704+
{
705+
}
706+
707+
public function setMaxTtl(int $ttlSeconds): BucketSettings
708+
{
709+
}
710+
711+
public function setCompressionMode(string $mode): BucketSettings
712+
{
713+
}
714+
}
715+
716+
class BucketManager
717+
{
718+
public function createBucket(BucketSettings $settings)
719+
{
720+
}
721+
722+
public function removeBucket(string $name)
723+
{
724+
}
725+
726+
public function getBucket(string $name): BucketSettings
727+
{
728+
}
729+
730+
public function getAllBuckets(): array
731+
{
732+
}
733+
734+
public function flush(string $name)
735+
{
736+
}
737+
}
738+
641739
class Role
642740
{
643741
public function name(): string
@@ -1082,6 +1180,71 @@ public function diagnostics($reportId)
10821180
}
10831181
}
10841182

1183+
class View
1184+
{
1185+
public function name(): string
1186+
{
1187+
}
1188+
1189+
public function map(): string
1190+
{
1191+
}
1192+
1193+
public function reduce(): string
1194+
{
1195+
}
1196+
1197+
public function setName(string $name): View
1198+
{
1199+
}
1200+
1201+
public function setMap(string $mapJsCode): View
1202+
{
1203+
}
1204+
1205+
public function setReduce(string $reduceJsCode): View
1206+
{
1207+
}
1208+
}
1209+
1210+
class DesignDocument
1211+
{
1212+
public function name(): string
1213+
{
1214+
}
1215+
1216+
public function views(): array
1217+
{
1218+
}
1219+
1220+
public function setName(string $name): DesignDocument
1221+
{
1222+
}
1223+
1224+
public function setViews(array $views): DesignDocument
1225+
{
1226+
}
1227+
}
1228+
1229+
class ViewIndexManager
1230+
{
1231+
public function getAllDesignDocuments(): array
1232+
{
1233+
}
1234+
1235+
public function getDesignDocument(string $name): DesignDocument
1236+
{
1237+
}
1238+
1239+
public function dropDesignDocument(string $name)
1240+
{
1241+
}
1242+
1243+
public function upsertDesignDocument(DesignDocument $document)
1244+
{
1245+
}
1246+
}
1247+
10851248
class MutationState
10861249
{
10871250
public function __construct()
@@ -2656,67 +2819,6 @@ interface QueryProfile
26562819
public const TIMINGS = 3;
26572820
}
26582821

2659-
/**
2660-
* Interface for working with Full Text Search indexes.
2661-
*/
2662-
class SearchIndexManager
2663-
{
2664-
/** @ignore */
2665-
final private function __construct()
2666-
{
2667-
}
2668-
2669-
/**
2670-
* Returns list of currently defined search indexes.
2671-
*
2672-
* @return array of index definitions
2673-
*/
2674-
public function listIndexDefinitions()
2675-
{
2676-
}
2677-
2678-
/**
2679-
* Retrieves search index definition by its name.
2680-
*
2681-
* @param string $name index name
2682-
*
2683-
* @return array representing index
2684-
*/
2685-
public function getIndexDefinition($name)
2686-
{
2687-
}
2688-
2689-
/**
2690-
* Retrieves number of the documents currently covered by the index
2691-
*
2692-
* @param string $name index name
2693-
*
2694-
* @return int
2695-
*/
2696-
public function getIndexDocumentsCount($name)
2697-
{
2698-
}
2699-
2700-
/**
2701-
* Creates search index with specified name and definition
2702-
*
2703-
* @param string $name index name
2704-
* @param string $definition JSON-encoded index definition
2705-
*/
2706-
public function createIndex($name, $definition)
2707-
{
2708-
}
2709-
2710-
/**
2711-
* Deletes search index by its name.
2712-
*
2713-
* @param string $name index name
2714-
*/
2715-
public function deleteIndex($name)
2716-
{
2717-
}
2718-
}
2719-
27202822
class ClusterOptions {
27212823
public function credentials(string $username, string $password): ClusterOptions
27222824
{

src/couchbase/managers/view_index_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
314314
ZEND_END_ARG_INFO()
315315

316316
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(ai_DesignDocument_setViews, 0, 1, \\Couchbase\\DesignDocument, 0)
317-
ZEND_ARG_TYPE_INFO(0, name, IS_ARRAY, 0)
317+
ZEND_ARG_TYPE_INFO(0, views, IS_ARRAY, 0)
318318
ZEND_END_ARG_INFO()
319319

320320
PHP_METHOD(DesignDocument, name)

0 commit comments

Comments
 (0)