Documentation

CollectionManager
in package
implements CollectionManagerInterface

Interfaces, Classes, Traits and Enums

CollectionManagerInterface

Table of Contents

$bucketName  : string
$core  : resource
__construct()  : mixed
createCollection()  : mixed
Creates a new collection
createScope()  : mixed
Create a new scope
dropCollection()  : mixed
Drops an existing collection
dropScope()  : mixed
Drops an existing scope
getAllScopes()  : array<string|int, mixed>
Retrieves all scopes within the bucket
updateCollection()  : mixed
Updates an existing collection

Properties

Methods

__construct()

public __construct(mixed $core, string $bucketName) : mixed
Parameters
$core : mixed
$bucketName : string
Return values
mixed

createCollection()

Creates a new collection

public createCollection(string|CollectionSpec $scopeName[, string|CreateCollectionOptions $collectionName = null ][, CreateCollectionSettings|null $settings = null ][, CreateCollectionOptions|null $options = null ]) : mixed

Note: The (CollectionSpec, CreateCollectionOptions) API is now deprecated.

Parameters
$scopeName : string|CollectionSpec

The name of the scope on which to create the collection. Deprecated: CollectionSpec

$collectionName : string|CreateCollectionOptions = null

The name of the collection. Deprecated: CreateCollectionOptions

$settings : CreateCollectionSettings|null = null

The settings to apply on the collection

$options : CreateCollectionOptions|null = null

The options to use when creating a collection

Tags
throws
InvalidArgumentException
since
4.1.6
Return values
mixed

createScope()

Create a new scope

public createScope(string $name[, CreateScopeOptions|null $options = null ]) : mixed
Parameters
$name : string

name of the scope

$options : CreateScopeOptions|null = null

the options to use when creating a scope

Tags
since
4.1.3
Return values
mixed

dropCollection()

Drops an existing collection

public dropCollection(string|CollectionSpec $scopeName[, string|DropCollectionOptions|null $collectionName = null ][, DropcollectionOptions|null $options = null ]) : mixed

Note: The (CollectionSpec, DropCollectionOptions) API is now deprecated.

Parameters
$scopeName : string|CollectionSpec

The name of the scope on which the collection exists.

$collectionName : string|DropCollectionOptions|null = null

The name of the collection. Only nullable to support the deprecated API.

$options : DropcollectionOptions|null = null

The options to use when dropping a collection

Tags
throws
InvalidArgumentException
since
4.1.3
Return values
mixed

dropScope()

Drops an existing scope

public dropScope(string $name[, DropScopeOptions|null $options = null ]) : mixed
Parameters
$name : string

of the scope to drop

$options : DropScopeOptions|null = null

the options to use when dropping a scope

Tags
since
4.1.3
Return values
mixed

getAllScopes()

Retrieves all scopes within the bucket

public getAllScopes([GetAllScopesOptions|null $options = null ]) : array<string|int, mixed>
Parameters
$options : GetAllScopesOptions|null = null

The options to use when retrieving the scopes

Tags
see
ScopeSpec
Return values
array<string|int, mixed>

array of scopes within the bucket

updateCollection()

Updates an existing collection

public updateCollection(string $scopeName, string $collectionName, UpdateCollectionSettings $settings[, UpdateCollectionOptions|null $options = null ]) : mixed
Parameters
$scopeName : string

name of the scope on which the collection exists

$collectionName : string

collection name

$settings : UpdateCollectionSettings

Settings to update on the collection

$options : UpdateCollectionOptions|null = null

The options to use when updating the collection

Tags
since
4.1.6
Return values
mixed

        

Search results