Property | Type | Description | |
---|---|---|---|
$_connectionGroups | |||
$_initialised | |||
$_requirementCreators | |||
$_requirements | |||
$_validOperations |
Method | Description | |
---|---|---|
addConnections ( array $options ) | Add connections Shanty Mongo | |
addMaster ( Shanty_Mongo_Connection $connection, integer $weight = 1, $connectionGroup = 'default' ) | Add a connection to a master server | |
addSlave ( Shanty_Mongo_Connection $connection, $weight = 1, $connectionGroup = 'default' ) | Add a connection to a slaver server | |
createRequirement ( $name, $options = null ) : mixed | Create a requirement | |
getConnectionGroup ( string $name ) : Shanty_Mongo_Connection_Group | Get a connection group. If it doesn't already exist, create it | |
getConnectionGroups ( ) : array | Get a list of all connection groups | |
getReadConnection ( string $connectionGroupName = 'default' ) : Shanty_Mongo_Connection | Get a read connection | |
getWriteConnection ( string $connectionGroupName = 'default' ) : Shanty_Mongo_Connection | Get a write connection | |
hasConnectionGroup ( string $name ) | Determine if a connection group exists | |
init ( ) | Initialise Shanty_Mongo. In particular all the requirements. | |
isValidOperation ( string $operation ) | Deterimine if an operation is valid | |
makeClean ( ) | Return Shanty_Mongo to pre-init status | |
removeConnectionGroups ( ) | Remove all connection groups | |
removeRequirementCreators ( ) | Remove all requirement creators | |
removeRequirements ( ) | Remove all requirements | |
retrieveRequirement ( $name, $options = null ) : mixed | Get the requirement matching the name provided | |
setConnectionGroup ( string $name, Shanty_Mongo_Connection_Group $connectionGroup ) | Set a connection group | |
storeRequirement ( $name, $requirement ) | Add requirements to use in validation of document properties | |
storeRequirementCreator ( $regex, Closure $function ) | Add a creator of requirements |
public static addConnections ( array $options ) | ||
$options | array |
public static addSlave ( Shanty_Mongo_Connection $connection, $weight = 1, $connectionGroup = 'default' ) | ||
$connection | Shanty_Mongo_Connection | |
$weight |
public static createRequirement ( $name, $options = null ) : mixed | ||
$name | String Name of requirement | |
return | mixed |
public static getConnectionGroup ( string $name ) : Shanty_Mongo_Connection_Group | ||
$name | string | The name of the connection group |
return | Shanty_Mongo_Connection_Group |
public static getConnectionGroups ( ) : array | ||
return | array |
public static getReadConnection ( string $connectionGroupName = 'default' ) : Shanty_Mongo_Connection | ||
$connectionGroupName | string | The connection group name |
return | Shanty_Mongo_Connection |
public static getWriteConnection ( string $connectionGroupName = 'default' ) : Shanty_Mongo_Connection | ||
$connectionGroupName | string | The connection group name |
return | Shanty_Mongo_Connection |
public static hasConnectionGroup ( string $name ) | ||
$name | string | The name of the connection group |
public static init ( ) |
public static isValidOperation ( string $operation ) | ||
$operation | string |
public static removeConnectionGroups ( ) |
public static removeRequirementCreators ( ) |
public static removeRequirements ( ) |
public static retrieveRequirement ( $name, $options = null ) : mixed | ||
$name | String Name of requirement | |
return | mixed |
public static setConnectionGroup ( string $name, Shanty_Mongo_Connection_Group $connectionGroup ) | ||
$name | string | |
$connectionGroup | Shanty_Mongo_Connection_Group |
public static storeRequirement ( $name, $requirement ) | ||
$name | String Name of requirement | |
$requirement | mixed |
public static storeRequirementCreator ( $regex, Closure $function ) | ||
$function | Closure |