예제 #1
0
 public static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new self();
     }
     return self::$instance;
 }
예제 #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));
 }
예제 #3
0
 /**
  * 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);
 }
예제 #4
0
<?php

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