Contentserv PHP API

CSMemoryDatabase
in package

Tags

Table of Contents

createConfiguration()  : CSMemoryDatabaseConfiguration
Creates the configuration API object to initialize the memory database instance.
createCredentials()  : CSMemoryDatabaseCredentials
Creates the credentials API object for the memory database.
createDefaultInstance()  : CSMemoryDatabaseInstance|null
Returns a memory database instance from the default application config.
createInstance()  : CSMemoryDatabaseInstance
Returns a memory database instance for a given configuration API object.
createItem()  : CSMemoryDatabaseItem
Creates the memory database item to store a key / value pair in the memory database.
createSessionHandler()  : CSMemoryDatabaseSessionHandler
Creates a session handler API object to define the handler & save path of the session handling.
getAvailableServiceTypes()  : array<string|int, string>
Returns all available service types in the memory database.
isEnabled()  : bool
Checks if the instance from config is enabled or disabled.
throwError()  : void
Throws a memory database storage exception for a given message and error code.

Methods

createDefaultInstance()

Returns a memory database instance from the default application config.

public static createDefaultInstance() : CSMemoryDatabaseInstance|null

It iterates through all available service types and uses the first service, which is enabled.

Tags
Return values
CSMemoryDatabaseInstance|null

createInstance()

Returns a memory database instance for a given configuration API object.

public static createInstance(CSMemoryDatabaseConfiguration $oConfiguration) : CSMemoryDatabaseInstance

A specific service type has to be given to initialize the instance.

Parameters
$oConfiguration : CSMemoryDatabaseConfiguration

The configuration API object to initialize the memory database instance.

Tags
throws
CSMemoryDatabaseException
Return values
CSMemoryDatabaseInstance

createSessionHandler()

Creates a session handler API object to define the handler & save path of the session handling.

public static createSessionHandler(string $sSaveHandler, string $sSavePath) : CSMemoryDatabaseSessionHandler
Parameters
$sSaveHandler : string

The target save handler.

$sSavePath : string

The target save path.

Tags
Return values
CSMemoryDatabaseSessionHandler

getAvailableServiceTypes()

Returns all available service types in the memory database.

public static getAvailableServiceTypes() : array<string|int, string>
Tags
Return values
array<string|int, string>

isEnabled()

Checks if the instance from config is enabled or disabled.

public static isEnabled() : bool

The method will iterate through all available services and uses the first service, which is enabled.

Tags
Return values
bool

throwError()

Throws a memory database storage exception for a given message and error code.

public static throwError(string $sMessage, int $iErrorCode) : void
Parameters
$sMessage : string

The message for the memory database exception.

$iErrorCode : int

The error code for the memory database exception.

Tags
throws
CSMemoryDatabaseException
Return values
void

        

Search results