Example #1
0
 function __construct()
 {
     try {
         // $this->cfg = Tools::getConfig('tsconfig_dev');
         $this->cfg = Tools::getConfig('tsconfig');
         $this->ts3 = TeamSpeak3::factory("serverquery://{$this->cfg['user']}:{$this->cfg['pass']}@{$this->cfg['host']}:{$this->cfg['qPort']}/?server_port={$this->cfg['sPort']}&nickname={$this->cfg['nick']}");
     } catch (Exception $e) {
         Tools::Log('error', 'Error', array($e));
     }
 }
Example #2
0
 function __construct()
 {
     try {
         // $this->cfg = Tools::getConfig('email_dev');
         $this->cfg = Tools::getConfig('email');
         if ($this->cfg['ssl']) {
             $transport = Swift_SmtpTransport::newInstance($this->cfg['smtp'], $this->cfg['port'], 'ssl');
         } else {
             $transport = Swift_SmtpTransport::newInstance($this->cfg['smtp'], $this->cfg['port']);
         }
         $transport->setUsername($this->cfg['user'])->setPassword($this->cfg['pass']);
         $this->mailer = Swift_Mailer::newInstance($transport);
         $this->message = Swift_Message::newInstance('request')->setFrom($this->cfg['from']);
     } catch (Exception $e) {
         Tools::Log('error', 'Error: ', array($e));
     }
 }
Example #3
0
<?php

use Illuminate\Database\Capsule\Manager as Capsule;
$cfg = Tools::getConfig('database');
$capsule = new Capsule();
$capsule->addConnection(['driver' => $cfg['driver'], 'host' => $cfg['host'], 'database' => $cfg['database'], 'username' => $cfg['username'], 'password' => $cfg['password'], 'charset' => $cfg['charset'], 'collation' => $cfg['collation'], 'prefix' => $cfg['prefix']]);
$capsule->setAsGlobal();
$capsule->bootEloquent();
Example #4
0
 function __construct()
 {
     $this->cfg = Tools::getConfig('global');
 }