PHP Класс Shanty_Mongo_Connection_Stack

Автор: Coen Hyde
Наследование: implements SeekableIterator, implements Countable, implements ArrayAccess
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_cacheConnectionSelection
$_cachedConnection
$_nodes
$_options
$_position
$_weights

Открытые методы

Метод Описание
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

Описание методов

addNode() публичный Метод

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

cacheConnectionSelection() публичный Метод

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

count() публичный Метод

Count all the connections
public count ( )

current() публичный Метод

Get the current connection
public current ( ) : Shanty_Mongo_Connection
Результат Shanty_Mongo_Connection

getCachedConnection() публичный Метод

Get the cached connection
public getCachedConnection ( ) : Shanty_Mongo_Connection
Результат Shanty_Mongo_Connection

getOption() публичный Метод

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

hasCachedConnection() публичный Метод

Determine if this connection stack has a cached connection
public hasCachedConnection ( ) : boolean
Результат boolean

key() публичный Метод

Get teh current key
public key ( ) : integer
Результат integer

next() публичный Метод

Move the pointer to the next connection
public next ( )

offsetExists() публичный Метод

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

offsetGet() публичный Метод

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

offsetSet() публичный Метод

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

offsetUnset() публичный Метод

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

rewind() публичный Метод

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

seek() публичный Метод

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

selectNode() публичный Метод

Select a node from the connection stack.
public selectNode ( ) : Shanty_Mongo_Connection
Результат Shanty_Mongo_Connection

setOption() публичный Метод

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

setOptions() публичный Метод

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

valid() публичный Метод

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

Описание свойств

$_cacheConnectionSelection защищенное свойство

protected $_cacheConnectionSelection

$_cachedConnection защищенное свойство

protected $_cachedConnection

$_nodes защищенное свойство

protected $_nodes

$_options защищенное свойство

protected $_options

$_position защищенное свойство

protected $_position

$_weights защищенное свойство

protected $_weights