public function __construct(array $config)
 {
     parent::__construct($config);
     $this->mailer = new CupMailer($config);
     $this->em = $this->getEntityManager($config);
     $this->userHelper = new UserHelper($this->em);
 }
Esempio n. 2
0
 public function __construct(array $config)
 {
     self::$static_config = $config;
     $this->startSession();
     $this->config = $this->array_to_object($config);
     $this->tituloSite = $this->config->site->titulo;
     try {
         $this->db = new PDO("mysql:host=" . $this->config->database->host . ";dbname=" . $this->config->database->dbname, $this->config->database->user, $this->config->database->password);
     } catch (Exception $ex) {
         die('Erro ao conectar no banco de dados.');
     }
 }
Esempio n. 3
0
 public function __construct(array $config)
 {
     $this->from = 'bot@' . $_SERVER["HTTP_HOST"];
     return parent::__construct($config);
 }