eZPublishCommunityProject(LegacyStack)  2013.5
ezpClusterGateway Class Reference

Basis for a cluster gateway. More...

+ Inheritance diagram for ezpClusterGateway:

Public Member Functions

 __construct (array $params=array())
 Instantiate a gateway with the database parameters. More...
 
 close ()
 Closes any connection that should be closed. More...
 
 connect ()
 Creates the necessary database connection. More...
 
 fetchFileMetadata ($filepath)
 Fetches file metadata for $filepath. More...
 
 passthrough ($filepath, $filesize, $offset=false, $length=false)
 Passes the $filepath data through. More...
 
 retrieve ($filename)
 : evaluate whether it is the right place for those methods or if it should belong to other dedicated classes. More...
 

Static Public Member Functions

static getGateway ()
 Returns an instance of the gateway class depending on setGatewayClass(). More...
 
static setGatewayClass ($gatewayClass)
 Sets the gateway class to $gatewayClass. More...
 

Protected Attributes

 $charset
 
 $db
 
 $host
 
 $name
 
 $password
 
 $port
 
 $user
 

Private Member Functions

 interrupt ($message, $errorCode=false, $filename=false)
 Error termination. More...
 
 notModified ()
 

Static Private Attributes

static $gatewayClass
 

Detailed Description

Basis for a cluster gateway.

Inherited by cluster index gateways

Constructor & Destructor Documentation

ezpClusterGateway::__construct ( array  $params = array())

Instantiate a gateway with the database parameters.

Parameters
array$paramsDatabase parameters.

Member Function Documentation

ezpClusterGateway::close ( )
abstract

Closes any connection that should be closed.

Referenced by notModified(), and retrieve().

ezpClusterGateway::connect ( )
abstract

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
RuntimeExceptionif connection failed

Referenced by retrieve().

ezpClusterGateway::fetchFileMetadata (   $filepath)
abstract

Fetches file metadata for $filepath.

Parameters
string$filepath
Returns
array|false

Referenced by retrieve().

static ezpClusterGateway::getGateway ( )
static

Returns an instance of the gateway class depending on setGatewayClass().

Returns
ezpClusterGateway
ezpClusterGateway::interrupt (   $message,
  $errorCode = false,
  $filename = false 
)
private

Error termination.

Parameters
string$data
int$errorCodeHTTP error code
string$filename
Returns

Referenced by retrieve().

ezpClusterGateway::notModified ( )
private

Referenced by retrieve().

ezpClusterGateway::passthrough (   $filepath,
  $filesize,
  $offset = false,
  $length = false 
)
abstract

Passes the $filepath data through.

Parameters
mixed$db
string$filepath
int$filesize
int$offset
int$length
Returns
void

Referenced by retrieve().

ezpClusterGateway::retrieve (   $filename)

: evaluate whether it is the right place for those methods or if it should belong to other dedicated classes.

: get rid of constants

static ezpClusterGateway::setGatewayClass (   $gatewayClass)
static

Sets the gateway class to $gatewayClass.

Parameters
string$gatewayClass

Member Data Documentation

ezpClusterGateway::$charset
protected
ezpClusterGateway::$db
protected
ezpClusterGateway::$gatewayClass
staticprivate

Referenced by getGateway(), and setGatewayClass().

ezpClusterGateway::$host
protected
ezpClusterGateway::$name
protected
ezpClusterGateway::$password
protected
ezpClusterGateway::$port
protected
ezpClusterGateway::$user
protected

The documentation for this class was generated from the following file: