PHP Class Shanty_Mongo_Connection_Stack

Author: Coen Hyde
Inheritance: implements SeekableIterator, implements Countable, implements ArrayAccess
Afficher le fichier Open project: coen-hyde/shanty-mongo

Protected Properties

Свойство Type Description
$_cacheConnectionSelection
$_cachedConnection
$_nodes
$_options
$_position
$_weights

Méthodes publiques

Méthode Description
addNode ( Shanty_Mongo_Connection $connection, integer $weight = 1 ) Add node to connection stack
cacheConnectionSelection ( boolean $value = null ) Get or set the flag to determine if the first connection selection should be cached
count ( ) Count all the connections
current ( ) : Shanty_Mongo_Connection Get the current connection
getCachedConnection ( ) : Shanty_Mongo_Connection Get the cached connection
getOption ( string $option ) Get an option
hasCachedConnection ( ) : boolean Determine if this connection stack has a cached connection
key ( ) : integer Get teh current key
next ( ) Move the pointer to the next connection
offsetExists ( integer $offset ) Test if an offset exists
offsetGet ( integer $offset ) Get an offset
offsetSet ( Shanty_Mongo_Connection $offset, $connection ) Set an offset
offsetUnset ( integer $offset ) Unset an offset
rewind ( ) Rewind the pointer to the begining of the stack
seek ( $position ) Seek to a particular connection
selectNode ( ) : Shanty_Mongo_Connection Select a node from the connection stack.
setOption ( string $option, mixed $value ) Set an option
setOptions ( array $options ) Set Options
valid ( ) Is the location of the current pointer valid

Method Details

addNode() public méthode

Add node to connection stack
public addNode ( Shanty_Mongo_Connection $connection, integer $weight = 1 )
$connection Shanty_Mongo_Connection
$weight integer

cacheConnectionSelection() public méthode

Get or set the flag to determine if the first connection selection should be cached
public cacheConnectionSelection ( boolean $value = null )
$value boolean

count() public méthode

Count all the connections
public count ( )

current() public méthode

Get the current connection
public current ( ) : Shanty_Mongo_Connection
Résultat Shanty_Mongo_Connection

getCachedConnection() public méthode

Get the cached connection
public getCachedConnection ( ) : Shanty_Mongo_Connection
Résultat Shanty_Mongo_Connection

getOption() public méthode

Get an option
public getOption ( string $option )
$option string

hasCachedConnection() public méthode

Determine if this connection stack has a cached connection
public hasCachedConnection ( ) : boolean
Résultat boolean

key() public méthode

Get teh current key
public key ( ) : integer
Résultat integer

next() public méthode

Move the pointer to the next connection
public next ( )

offsetExists() public méthode

Test if an offset exists
public offsetExists ( integer $offset )
$offset integer

offsetGet() public méthode

Get an offset
public offsetGet ( integer $offset )
$offset integer

offsetSet() public méthode

Set an offset
public offsetSet ( Shanty_Mongo_Connection $offset, $connection )
$offset Shanty_Mongo_Connection
$connection

offsetUnset() public méthode

Unset an offset
public offsetUnset ( integer $offset )
$offset integer

rewind() public méthode

Rewind the pointer to the begining of the stack
public rewind ( )

seek() public méthode

Seek to a particular connection
public seek ( $position )
$position

selectNode() public méthode

Select a node from the connection stack.
public selectNode ( ) : Shanty_Mongo_Connection
Résultat Shanty_Mongo_Connection

setOption() public méthode

Set an option
public setOption ( string $option, mixed $value )
$option string
$value mixed

setOptions() public méthode

Set Options
public setOptions ( array $options )
$options array

valid() public méthode

Is the location of the current pointer valid
public valid ( )

Property Details

$_cacheConnectionSelection protected_oe property

protected $_cacheConnectionSelection

$_cachedConnection protected_oe property

protected $_cachedConnection

$_nodes protected_oe property

protected $_nodes

$_options protected_oe property

protected $_options

$_position protected_oe property

protected $_position

$_weights protected_oe property

protected $_weights