Changes how different classes use the Config class.
They were trying to use it as an array instead of using it's helper method that actually returned a usable array. Fixes #4.
This commit is contained in:
@@ -48,11 +48,12 @@ class Emailer
|
||||
private function prepareMailerEnvelope()
|
||||
{
|
||||
$config = new Config();
|
||||
$cConfigArray = $config->getConfig();
|
||||
|
||||
$username = $Config['mailer']['username'];
|
||||
$password = $Config['mailer']['password'];
|
||||
$hostname = $Config['mailer']['hostname'];
|
||||
$port = $Config['mailer']['port'];
|
||||
$username = $cConfigArray['mailer']['username'];
|
||||
$password = $cConfigArray['mailer']['password'];
|
||||
$hostname = $cConfigArray['mailer']['hostname'];
|
||||
$port = $cConfigArray['mailer']['port'];
|
||||
|
||||
$connStr = 'tls://' . $username . ":" . $password . "@" . $hostname . ":" . $port;
|
||||
|
||||
|
@@ -22,8 +22,9 @@ class EmailRenderer
|
||||
public function __construct()
|
||||
{
|
||||
$config = new Config();
|
||||
$cConfigArray = $config->getConfig();
|
||||
|
||||
$loader = new Twig_Loader_Filesystem($config['templates']['templatesDirectory']);
|
||||
$loader = new Twig_Loader_Filesystem($cConfigArray['templates']['templatesDirectory']);
|
||||
$this->twig = new Twig_Environment($loader);
|
||||
|
||||
}
|
||||
|
@@ -11,10 +11,11 @@ class VirtualminHandler
|
||||
public function __construct()
|
||||
{
|
||||
$Config = new Config();
|
||||
$cConfigArray = $Config->getConfig();
|
||||
|
||||
$url = $Config['vmin-url'];
|
||||
$username = $Config['username'];
|
||||
$password = $Config['password'];
|
||||
$url = $cConfigArray['vmin-url'];
|
||||
$username = $cConfigArray['username'];
|
||||
$password = $cConfigArray['password'];
|
||||
|
||||
$this->virtualmin = new Virtualmin\VirtualServersClient($url, $username, $password);
|
||||
}
|
||||
|
Reference in New Issue
Block a user