コード例 #1
0
 public function testIsDatabaseSplitInSettings()
 {
     $CONFIG = new stdClass();
     $CONFIG->db['split'] = true;
     $conf = new Elgg_Database_Config($CONFIG);
     $this->assertTrue($conf->isDatabaseSplit());
 }
コード例 #2
0
ファイル: Database.php プロジェクト: pombredanne/ArcherSys
	/**
	 * Establish database connections
	 *
	 * If the configuration has been set up for multiple read/write databases, set those
	 * links up separately; otherwise just create the one database link.
	 *
	 * @return void
	 * @throws DatabaseException
	 */
	public function setupConnections() {
		if ($this->config->isDatabaseSplit()) {
			$this->establishLink('read');
			$this->establishLink('write');
		} else {
			$this->establishLink('readwrite');
		}
	}