コード例 #1
0
ファイル: DB.php プロジェクト: ringmaster/microsite2_core
 /**
  * Get a database reference.
  * @static
  * @param string $index (optional) The database name
  * @return DB The Referenced database object
  */
 public static function get($index = 'root')
 {
     if (empty(self::$db[$index])) {
         self::$db[$index] = new DB(Config::get('connect_string'));
     }
     return self::$db[$index];
 }
コード例 #2
0
ファイル: config.php プロジェクト: ringmaster/microsite2_old
<?php

namespace app;

use microsite\core\Config;
use microsite\core\RegexRoute;
Config::load(array('routes' => array(new RegexRoute('app\\controllers\\Index', 'hello', '#^hello(?:/(?P<name>.+))?#'), new RegexRoute('app\\controllers\\Index', 'index', '#.*#'))));