LoadBalancerNo.php 485 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. **/
  4. require_once( dirname(__FILE__) . '/DatabaseNo.php' );
  5. class LoadBalancerNo
  6. {
  7. static $instance;
  8. static function &getInstance() {
  9. if ( !isset( self::$instance ) ) {
  10. self::$instance = new self();
  11. }
  12. return self::$instance;
  13. }
  14. var $conn;
  15. function &getConnection( $i, $groups = array(), $wiki = false ) {
  16. if ( !isset( $this->conn )) {
  17. $this->conn = DatabaseNo::getInstance();
  18. }
  19. return $this->conn;
  20. }
  21. function getServerCount() {
  22. return 1;
  23. }
  24. }