Example #1
0
 public function __construct()
 {
     $config = ['className' => 'Cake\\Database\\Connection', 'driver' => 'Cake\\Database\\Driver\\Mysql', 'database' => Configure::get('database.database'), 'username' => Configure::get('database.username'), 'password' => Configure::get('database.password'), 'host' => Configure::get('database.host'), 'persistent' => Configure::get('database.persistant'), 'encoding' => Configure::get('database.encoding'), 'timezone' => Configure::get('database.timezone'), 'quoteIdentifiers' => Configure::get('database.quoteIdentifiers'), 'log' => Configure::get('database.log')];
     ConnectionManager::config('default', $config);
     $link = ConnectionManager::get('default');
     self::$_logger = new QueryLogger();
     $link->logger(self::$_logger);
 }
Example #2
0
 public function __construct()
 {
     parent::__construct();
     $settings = Configure::get('Mailer');
     if ($settings['useSMTP']) {
         $this->isSMTP();
         $this->Host = $settings['Host'];
         $this->SMTPAuth = $settings['SMTPAuth'];
         $this->Username = $settings['Username'];
         $this->Password = $settings['Password'];
         $this->SMTPSecure = $settings['SMTPSecure'];
         $this->Port = $settings['Port'];
         $this->setLanguage($settings['Language']);
         $this->CharSet = 'utf8';
     }
     if ($settings['FromEmail']) {
         $this->setFrom($settings['FromEmail'], $settings['FromName']);
     }
     if ($settings['ReplyEmail']) {
         $this->addReplyTo($settings['ReplyEmail'], $settings['ReplyName']);
     }
     return $this;
 }
Example #3
0
<?php

use Frambox\Kernel\ErrorHandler;
use Frambox\Kernel\Configure;
Configure::getInstance();
mb_internal_encoding(Configure::get('globals.encoding'));
date_default_timezone_set(Configure::get('globals.timezone'));
ini_set('intl.default_locale', Configure::get('globals.locale'));
ErrorHandler::setDebug(Configure::get('globals.debug'));