what is the design pattern for this code ?
class Foo {
private $_connection;
private static $_instance;
private $_host = "Host";
private $_username = "Name";
private $_password = "encrypted Word";
private $_database = "Name";
public static function getInstance() {
if(self::$_instance = 'Connected') {
self::$_instance = new self();
}
return self::$_instance;
}
private function __construct() {
$this->_connection = new mysqli($this->_host, $this->_username,
$this->_password, $this->_database);
}
public function getConnection() {
return $this->_connection;
}
}