eZ Publish Community Project (Legacy Stack) 2013.4
Class

ezpClusterGateway

abstract class ezpClusterGateway

Basis for a cluster gateway.

Inherited by cluster index gateways

Methods

__construct(array $params = array())

Instantiate a gateway with the database parameters.

connect()

Creates the necessary database connection

array|false fetchFileMetadata(string $filepath)

Fetches file metadata for $filepath

void passthrough($filepath, $filesize, $offset = false, $length = false)

Passes the $filepath data through

close()

Closes any connection that should be closed

retrieve($filename)

static  setGatewayClass(string $gatewayClass)

Sets the gateway class to $gatewayClass

static ezpClusterGateway getGateway()

Returns an instance of the gateway class depending on {@link setGatewayClass()}

Details

at line 76
public __construct(array $params = array())

Instantiate a gateway with the database parameters.

Parameters

array $params Database parameters.

at line 105
abstract public connect()

Creates the necessary database connection

The database connexion must be usable as is after return, meaning that database connection, charset choice must be set

Exceptions

RuntimeException if connection failed

at line 114
abstract public array|false fetchFileMetadata(string $filepath)

Fetches file metadata for $filepath

Parameters

string $filepath

Return Value

array|false

at line 125
abstract public void passthrough($filepath, $filesize, $offset = false, $length = false)

Passes the $filepath data through

Parameters

$filepath
$filesize
$offset
$length

Return Value

void

at line 130
abstract public close()

Closes any connection that should be closed

at line 137
public retrieve($filename)

Parameters

$filename

at line 340
static public setGatewayClass(string $gatewayClass)

Sets the gateway class to $gatewayClass

Parameters

string $gatewayClass

at line 350
static public ezpClusterGateway getGateway()

Returns an instance of the gateway class depending on {@link setGatewayClass()}

Return Value

ezpClusterGateway