Exemplo n.º 1
0
 public function __construct($message, $code = 500, Exception $previous = null, $traits = [])
 {
     parent::__construct($message, $code, $previous);
     $this->registerLogging();
     $txt = $message . ' in ' . parent::getFile() . ':' . parent::getLine() . "\n" . $this->generateBacktrace();
     $this->exceptionLog($txt);
     if (Config::get('app', 'debug') == 1) {
         $this->setErrorTraits($traits);
     } else {
         die('Whoops, looks like we encountered an error!');
     }
 }
Exemplo n.º 2
0
 /**
  * ### Sets the protcol to be used by PHPMailer
  *
  * @param string $protocol
  */
 private function protocol($protocol)
 {
     switch ($protocol) {
         case 'smtp':
             if (Config::get('mail', 'username')) {
                 $this->mailer->SMTPAuth = true;
             } else {
                 $this->mailer->SMTPAuth = false;
             }
             $this->mailer->isSMTP();
             break;
         case 'php':
             $this->mailer->isSendmail();
             break;
         default:
             if (Config::get('mail', 'username')) {
                 $this->mailer->SMTPAuth = true;
             } else {
                 $this->mailer->SMTPAuth = false;
             }
             $this->mailer->isSMTP();
     }
 }
Exemplo n.º 3
0
 /**
  * ### Returns the value belonging to the given key
  *
  * @param string $key
  * @return mixed
  */
 public function get($key)
 {
     $prefix = Config::get('cache', 'key_prefix');
     return unserialize($this->conn->get($prefix . $key));
 }