public function __construct($logging = false, $settingsfile = null)
{
$this->logging = $logging;
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$path = str_replace('Metaregistrar\\TMCH\\', dirname(__FILE__) . '\\..\\..\\Registries\\', get_called_class());
} else {
$path = str_replace('Metaregistrar\\TMCH\\', dirname(__FILE__) . '/../../Registries/', get_called_class());
}
if (!$settingsfile) {
$settingsfile = 'settings.ini';
}
if ($settings = $this->loadSettings($path, $settingsfile)) {
$this->setHostname($settings['hostname']);
$this->setUsername($settings['userid']);
$this->setPassword($settings['password']);
$this->setPort($settings['port']);
}
}