PHP 클래스 Shanty_Mongo_Connection_Stack

저자: Coen Hyde
상속: implements SeekableIterator, implements Countable, implements ArrayAccess
파일 보기 프로젝트 열기: coen-hyde/shanty-mongo

보호된 프로퍼티들

프로퍼티 타입 설명
$_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