src/Connection/Pool.php
public static function get($config = null) {
		if (!isset($config['driver'])) {
			throw new ConnectionException("Unknown driver");
		}
		if (!isset($config['host']) || !isset($config['port'])) {
			throw new ConnectionException("Host and Port is required");
		}
		$type = $config['driver'];
		$hash = md5($type . ':' . $config['host'] . ':' . $config['port']);
		if (!isset(self::$created_driver[$hash])) {
			if (isset(self::$driver[$type])) {
				$className = self::$driver[$type];
			} else {
				$className = __NAMESPACE__ . '\\Driver\\' . ucfirst($type);
			}
			self::$created_driver[$hash] = new $className($config);
		}
		return self::$created_driver[$hash];
	}
public static function get($config = null) {
		if (!isset($config['driver'])) {
			throw new ConnectionException("Unknown driver");
		}
		if (!isset($config['host']) || !isset($config['port'])) {
			throw new ConnectionException("Host and Port is required");
		}
		$type = $config['driver'];
		$hash = md5($type . ':' . $config['host'] . ':' . $config['port']);
		if (!isset(self::$created_driver[$hash])) {
			if (isset(self::$driver[$type])) {
				$className = self::$driver[$type];
			} else {
				$className = __NAMESPACE__ . '\\Driver\\' . ucfirst($type);
			}
			self::$created_driver[$hash] = new $className($config);
		}
		return self::$created_driver[$hash];
	}
public static function get ( $ config = null ) { if ( ! isset ( $ config [ 'driver' ] ) ) { throw new ConnectionException ( "Unknown driver" ) ; } if ( ! isset ( $ config [ 'host' ] ) || ! isset ( $ config [ 'port' ] ) ) { throw new ConnectionException ( "Host and Port is required" ) ; } $ type = $ config [ 'driver' ] ; $ hash = md5 ( $ type . ':' . $ config [ 'host' ] . ':' . $ config [ 'port' ] ) ; if ( ! isset ( self :: $ created_driver [ $ hash ] ) ) { if ( isset ( self :: $ driver [ $ type ] ) ) { $ className = self :: $ driver [ $ type ] ; } else { $ className = __NAMESPACE__ . '\\Driver\\' . ucfirst ( $ type ) ; } self :: $ created_driver [ $ hash ] = new $ className ( $ config ) ; } return self :: $ created_driver [ $ hash ] ; }
Get a connection

@access public
@param mixed $config
@return object
Get a connection