Esempio n. 1
0
 public function setTitle($title = null, $mode = 'append')
 {
     if ($mode == 'append') {
         self::$_title = self::$_title . " - " . $title;
     } else {
         if ($mode == 'prepend') {
             self::$_title = $title . " - " . self::$_title;
         } else {
             self::$_title = $title;
         }
     }
 }
Esempio n. 2
0
$CONF['pastebin'] = '';
// Pull in the required database class.
switch ($CONF['driver']) {
    case "postgresql":
    case "pgsql":
    case "postgres":
        \Pste\Database::getInstance()->createConnection('pgsql', $CONF["dbhost"], $CONF['dbname'], $CONF["dbuser"], $CONF["dbpass"]);
        require_once 'classes/db.php';
        break;
    case "mysql":
        \Pste\Database::getInstance()->createConnection('mysql', $CONF["dbhost"], $CONF['dbname'], $CONF["dbuser"], $CONF["dbpass"]);
        require_once 'classes/db.php';
        break;
}
\Pste\Database::getInstance()->getConnection()->exec("SET NAMES 'utf8'");
$ht = new Pste_View_Helper_HeadTitle();
$ht->setTitle('Pste', 'replace');
/**
 * wrapper for config instance creation so the instance does not live in global
 * scope 
 */
function bootstrap($configuration_array)
{
    $config = new \Pste\Config($configuration_array);
    \Pste\Registry::getInstance()->config = $config;
    $route = new \Pste\Route();
    $route->setTemplatePath($config->template);
    \Pste\Registry::getInstance()->route = $route;
}
function __autoload($class)
{