Example #1
0
 public function __construct(Service $Service)
 {
     $this->Service = $Service;
     $this->Db = $Service->Database();
     $this->Db->connect();
     //Community Config Variables.
     //For Godsake Create a stable config system for the communities?
 }
 public function __construct(Service $Service)
 {
     $this->Service = $Service;
     $Service->Html()->CommunityUrlPrefix = 'Habba15';
 }
Example #3
0
    $platform = 'OPENSHIFT';
} elseif ($subdomain == 'dev') {
    $platform = "LOCAL";
    $Config->start_debug();
}
switch ($platform) {
    case 'LOCAL':
        //Debug is off. We are on development mode.
        $Config->set_database_user('root');
        $Config->set_database_pass('ODD');
        $Config->set_database_name('habba.dev');
        break;
    case 'OPENSHIFT':
        //Debug is off. We are on production mode.
        $Config->set_database_host(getenv('OPENSHIFT_MYSQL_DB_HOST'));
        $Config->set_database_port(getenv('OPENSHIFT_MYSQL_DB_PORT'));
        $Config->set_database_user(getenv('OPENSHIFT_MYSQL_DB_USERNAME'));
        $Config->set_database_pass(getenv('OPENSHIFT_MYSQL_DB_PASSWORD'));
        $Config->set_database_name(getenv('OPENSHIFT_GEAR_NAME'));
        break;
    default:
        //Debug off. remote unidentified platform
        $Config->set_database_user('ahabba_habba');
        $Config->set_database_pass('thez3dz3pp3lin');
        $Config->set_database_name('ahabba_h4bb4');
        break;
}
// $Config->stop_debug();
//Initiate Service container.
$Service = new Service($Config);
$Service->Database()->query("SET GLOBAL time_zone = '+5:30';");
Example #4
0
 public function __construct(Service $Service)
 {
     $this->Db = $Service->Database();
     $this->Db->connect();
 }