public static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemple #2
0
 /**
  * Include a PHP file, inject the controller's properties into that file, and return the output.
  * @param string $file The view file to render, relative to the base of the application.
  * @return string The rendered view file.
  */
 public function render_partial($file)
 {
     NimbleLogger::log("RENDERING PARTIAL: {$file}");
     $this->rendered_partials[] = $file;
     return $this->open_template(FileUtils::join(Nimble::getInstance()->config['view_path'], $file));
 }
 /**
  * executes a single query returns the result object;
  * @param $sql
  */
 public static function execute($sql, $reset = false)
 {
     if ($reset) {
         static::$adapter->reset();
     }
     if (static::test_mode()) {
         echo $sql . "\n\n";
     }
     NimbleLogger::log($sql);
     return static::$adapter->query($sql);
 }
<?php

define('DOMAIN', 'localhost.com');
NimbleMailer::$send_mail = false;
NimbleLogger::$enabled = true;