Exemplo n.º 1
0
 public function __construct($page_title, $body_id, $allowed = null)
 {
     parent::__construct();
     $this->page_title = $page_title . ' :: ' . $this->config->application->name;
     $this->body_id = $body_id;
     $this->allowed = $allowed;
 }
Exemplo n.º 2
0
 public function __construct($setup = "default")
 {
     parent::__construct();
     $paths = array("/classes/model/entities");
     if ($setup == "default") {
         $dbParams = array('driver' => 'pdo_mysql', 'user' => $this->config->db->user, 'password' => $this->config->db->pass, 'dbname' => $this->config->db->dbname);
         $devMode = true;
     }
     $setup = Setup::createAnnotationMetadataConfiguration($paths, $devMode);
     $this->em = EntityManager::create($dbParams, $setup);
 }
Exemplo n.º 3
0
 public function __construct($transport = 'Mail')
 {
     parent::__construct(APPLICATION_CONFIGURATION_FILE, APPLICATION_ROOT_URL);
     switch ($transport) {
         case 'Mail':
             $this->transport = \Swift_MailTransport::newInstance();
             break;
         case 'Smtp':
             $this->transport = \Swift_SmtpTransport::newInstance($this->config->smtp->host, $this->config->smtp->port)->setUsername($this->config->smtp->user)->setPassword($this->config->smtp->pass);
             break;
         case 'Sendmail':
             $this->transport = \Swift_SendmailTransport::newInstance($this->config->sendmail->path);
             break;
     }
     $this->mailer = \Swift_Mailer::newInstance($this->transport);
 }