*/
public function load($options = array())
{
+ //system config file
+ $this->loadFromFile('/etc/linksys-wrt3g-tools');
+
+ //user config file
$file = $this->getConfigFilePath();
if ($file) {
$this->loadFromFile($file);
}
+ //environment variables: we use lowercase options, which should
+ // not collide with the uppercase env variables like USER
+ $this->loadOptions($_SERVER);
+ //commandline options
$this->loadOptions($options);
+ $this->logger->log(
+ sprintf(
+ "Configuration: %s:%s@%s",
+ $this->user, $this->password, $this->host
+ ),
+ 2
+ );
+
if (isset($options['save'])) {
$this->save($file);
}