public function setUp()
 {
     $container = \Propel\Runtime\Propel::getServiceContainer();
     $container->setAdapterClass('finite-test', 'sqlite');
     $connectionManager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
     $connectionManager->setConfiguration(['dsn' => '/tmp/test.db', 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper']);
     $connectionManager->setName('finite-test');
     $container->setConnectionManager('finite-test', $connectionManager);
 }
Exemplo n.º 2
0
 /**
  * initialize propel orm and import  it's configs
  */
 public static function init()
 {
     $serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
     $serviceContainer->checkVersion('2.0.0-dev');
     $serviceContainer->setAdapterClass('cocofile', 'mysql');
     $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
     $manager->setConfiguration(array('dsn' => sprintf('mysql:host=%s;dbname=%s', Config::get('database.yaml@database_host'), Config::get('database.yaml@database_name')), 'user' => Config::get('database.yaml@database_username'), 'password' => Config::get('database.yaml@database_password'), 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array('utf8' => 'SET NAMES utf8 COLLATE utf8_unicode_ci, COLLATION_CONNECTION = utf8_unicode_ci, COLLATION_DATABASE = utf8_unicode_ci, COLLATION_SERVER = utf8_unicode_ci')), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
     $manager->setName('cocofile');
     $serviceContainer->setConnectionManager('cocofile', $manager);
     $serviceContainer->setDefaultDatasource('cocofile');
 }
Exemplo n.º 3
0
 public static function init($config)
 {
     // Autogenerated with `propel config:convert` code
     $serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
     $serviceContainer->checkVersion('2.0.0-dev');
     $serviceContainer->setAdapterClass('engine', $config['type']);
     $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
     $manager->setConfiguration(['dsn' => $config['type'] . ':host=' . $config['host'] . ';' . 'dbname=' . $config['name'] . ';charset=' . $config['charset'], 'user' => $config['user'], 'password' => $config['password']]);
     $manager->setName('engine');
     $serviceContainer->setConnectionManager('engine', $manager);
     $serviceContainer->setDefaultDatasource('engine');
 }
Exemplo n.º 4
0
<?php

use Propel\Runtime\ServiceContainer\StandardServiceContainer;
require_once __DIR__ . '/dirs.php';
require_once SRC_DIR . '/globals.php';
require_once APP_DIR . '/vendor/autoload.php';
/** @var StandardServiceContainer $serviceContainer */
$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('ucca', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(['classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=ucca', 'user' => 'ucca', 'password' => 'begOMEq6SoPI', 'attributes' => ['ATTR_EMULATE_PREPARES' => false], 'settings' => ['charset' => 'utf8', 'queries' => ['utf8' => 'SET NAMES utf8']]]);
$manager->setName('ucca');
$serviceContainer->setConnectionManager('ucca', $manager);
$serviceContainer->setDefaultDatasource('ucca');
Exemplo n.º 5
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('xampp', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=bbw', 'user' => 'root', 'password' => '', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array('utf8' => 'SET NAMES utf8 COLLATE utf8_unicode_ci, COLLATION_CONNECTION = utf8_unicode_ci, COLLATION_DATABASE = utf8_unicode_ci, COLLATION_SERVER = utf8_unicode_ci'))));
$manager->setName('xampp');
$serviceContainer->setConnectionManager('xampp', $manager);
$serviceContainer->setDefaultDatasource('xampp');
Exemplo n.º 6
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('test', 'sqlite');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'sqlite::memory:', 'user' => '', 'password' => '', 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
$manager->setName('test');
$serviceContainer->setConnectionManager('test', $manager);
$serviceContainer->setDefaultDatasource('test');
Exemplo n.º 7
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('bookshop', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=bookshop', 'user' => 'bookshop', 'password' => '', 'attributes' => array('ATTR_EMULATE_PREPARES' => false)));
$manager->setName('bookshop');
$serviceContainer->setConnectionManager('bookshop', $manager);
$serviceContainer->setDefaultDatasource('bookshop');
Exemplo n.º 8
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('default', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;port=3306;dbname=bakalarka', 'user' => 'root', 'password' => '', 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
$manager->setName('default');
$serviceContainer->setConnectionManager('default', $manager);
$serviceContainer->setDefaultDatasource('default');
Exemplo n.º 9
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('ck-order-xml', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=davis', 'user' => 'root', 'password' => '', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array())));
$manager->setName('ck-order-xml');
$serviceContainer->setConnectionManager('ck-order-xml', $manager);
$serviceContainer->setAdapterClass('supplizer', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=davis', 'user' => 'root', 'password' => '', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array())));
$manager->setName('supplizer');
$serviceContainer->setConnectionManager('supplizer', $manager);
$serviceContainer->setDefaultDatasource('ck-order-xml');
Exemplo n.º 10
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('truckyeah', 'pgsql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'pgsql:host=localhost;dbname=orderup', 'user' => 'tree', 'password' => 'TreeTruckTron'));
$manager->setName('truckyeah');
$serviceContainer->setConnectionManager('truckyeah', $manager);
$serviceContainer->setDefaultDatasource('truckyeah');
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('RPIWannaHangOut', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=RPIWannaHangOut', 'user' => 'propel_user', 'password' => 'HvwE49yK23wKmQ6', 'attributes' => array('ATTR_EMULATE_PREPARES' => false)));
$manager->setName('RPIWannaHangOut');
$serviceContainer->setConnectionManager('RPIWannaHangOut', $manager);
$serviceContainer->setDefaultDatasource('RPIWannaHangOut');
Exemplo n.º 12
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('blueecon_faq', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=blueecon_faq', 'user' => 'root', 'password' => ''));
$manager->setName('blueecon_faq');
$serviceContainer->setConnectionManager('blueecon_faq', $manager);
$serviceContainer->setAdapterClass('blueeconomics', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=blueeconomics', 'user' => 'root', 'password' => ''));
$manager->setName('blueeconomics');
$serviceContainer->setConnectionManager('blueeconomics', $manager);
$serviceContainer->setDefaultDatasource('blueecon_faq');
Exemplo n.º 13
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('spoilerwiki-local', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=scotchbox', 'user' => 'root', 'password' => 'root', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
$manager->setName('spoilerwiki-local');
$serviceContainer->setConnectionManager('spoilerwiki-local', $manager);
$serviceContainer->setAdapterClass('spoilerwiki-remote', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=192.168.33.10;dbname=scotchbox', 'user' => 'root', 'password' => 'root', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
$manager->setName('spoilerwiki-remote');
$serviceContainer->setConnectionManager('spoilerwiki-remote', $manager);
$serviceContainer->setDefaultDatasource('spoilerwiki-local');
Exemplo n.º 14
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('bookstore', 'sqlite');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'sqlite::memory:', 'options' => array(), 'settings' => array('charset' => 'utf8')));
$manager->setName('bookstore');
$serviceContainer->setConnectionManager('bookstore', $manager);
$serviceContainer->setDefaultDatasource('bookstore');
Exemplo n.º 15
0
session_start();
#dependencies included via composer autoload
require '../vendor/autoload.php';
$conf = \Noodlehaus\Config::load(__DIR__ . DIRECTORY_SEPARATOR . 'settings.php');
#encoding
mb_internal_encoding($conf['app.encoding.mb_internal_encoding']);
mb_http_output($conf['app.encoding.mb_http_output']);
#timezone
date_default_timezone_set($conf['app.timezone']);
#Database Configuration
$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass($conf['app.namespace'], 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(['dsn' => 'mysql:host=' . $conf['app.db.host'] . ';port=' . $conf['app.db.port'] . ';dbname=' . $conf['app.db.name'], 'user' => $conf['app.db.username'], 'password' => $conf['app.db.password'], 'settings' => ['charset' => $conf['app.db.charset'], 'queries' => []], 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper']);
$manager->setName($conf['app.namespace']);
$serviceContainer->setConnectionManager($conf['app.namespace'], $manager);
$serviceContainer->setDefaultDatasource($conf['app.namespace']);
# End of Propel Database
#SLIM instantiate
$app = new \Slim\App();
$container = $app->getContainer();
$container['view'] = function ($container) use($conf) {
    $view = new \Slim\Views\Twig($conf['app.template.dir'], ['cache' => $conf['app.template.cache'], 'debug' => $conf['app.template.debug'], 'auto_reload' => $conf['app.template.auto_reload']]);
    $view->addExtension(new \Slim\Views\TwigExtension($container['router'], $container['request']->getUri()));
    $view->addExtension(new Twig_Extension_Debug());
    $view->offsetSet('userGlobalData', App::getUser());
    return $view;
};
$container['flash'] = function () {
    return new \Slim\Flash\Messages();
Exemplo n.º 16
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('diy', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=diy', 'user' => 'root', 'password' => 'wfBAT@gh', 'attributes' => array('ATTR_EMULATE_PREPARES' => false, 'ATTR_TIMEOUT' => 30), 'model_paths' => array(0 => 'src', 1 => 'vendor')));
$manager->setName('diy');
$serviceContainer->setConnectionManager('diy', $manager);
$serviceContainer->setDefaultDatasource('diy');
Exemplo n.º 17
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->setAdapterClass('bookstore', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => '\\Propel\\Runtime\\Connection\\DebugPDO', 'dsn' => 'mysql:host=127.0.0.1;dbname=test', 'user' => 'test_user', 'password' => 'test_pwd', 'options' => array('ATTR_PERSISTENT' => false), 'attributes' => array('ATTR_EMULATE_PREPARES' => true), 'settings' => array('charset' => 'utf8')));
$manager->setName('bookstore');
$serviceContainer->setConnectionManager('bookstore', $manager);
$serviceContainer->setAdapterClass('bookstore-cms', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => '\\Propel\\Runtime\\Connection\\DebugPDO', 'dsn' => 'mysql:host=127.0.0.1;dbname=test', 'user' => 'test_user', 'password' => 'test_pwd', 'options' => array('ATTR_PERSISTENT' => false), 'attributes' => array('ATTR_EMULATE_PREPARES' => true), 'settings' => array('charset' => 'utf8')));
$manager->setName('bookstore-cms');
$serviceContainer->setConnectionManager('bookstore-cms', $manager);
$serviceContainer->setAdapterClass('bookstore-behavior', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => '\\Propel\\Runtime\\Connection\\DebugPDO', 'dsn' => 'mysql:host=127.0.0.1;dbname=test', 'user' => 'test_user', 'password' => 'test_pwd', 'options' => array('ATTR_PERSISTENT' => false), 'attributes' => array('ATTR_EMULATE_PREPARES' => true), 'settings' => array('charset' => 'utf8')));
$manager->setName('bookstore-behavior');
$serviceContainer->setConnectionManager('bookstore-behavior', $manager);
$serviceContainer->setDefaultDatasource('bookstore');
Exemplo n.º 18
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('dtp', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=h23_dtp', 'user' => 'dev', 'password' => 'secret!', 'attributes' => array('ATTR_EMULATE_PREPARES' => false)));
$manager->setName('dtp');
$serviceContainer->setConnectionManager('dtp', $manager);
$serviceContainer->setDefaultDatasource('dtp');
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('development', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=dbcodeigniter', 'user' => 'root', 'password' => 'root', 'classname' => 'Propel\\Runtime\\Connection\\DebugPDO', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array())));
$manager->setName('development');
$serviceContainer->setConnectionManager('development', $manager);
$serviceContainer->setAdapterClass('production', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=dbcodeigniter', 'user' => 'root', 'password' => 'root', 'classname' => 'Propel\\Runtime\\Connection\\DebugPDO', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array())));
$manager->setName('production');
$serviceContainer->setConnectionManager('production', $manager);
$serviceContainer->setDefaultDatasource('development');
Exemplo n.º 20
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('pos', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=pos', 'user' => 'root', 'password' => 'sqlpass'));
$manager->setName('pos');
$serviceContainer->setConnectionManager('pos', $manager);
$serviceContainer->setDefaultDatasource('pos');
Exemplo n.º 21
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('keeko', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=keeko', 'user' => 'root', 'password' => '', 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
$manager->setName('keeko');
$serviceContainer->setConnectionManager('keeko', $manager);
$serviceContainer->setDefaultDatasource('keeko');
Exemplo n.º 22
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('slowshop', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=slowshop', 'user' => 'malatesta', 'password' => '$0bs0l3t0$#', 'attributes' => array('ATTR_EMULATE_PREPARES' => false), 'settings' => array('charset' => 'utf8', 'queries' => array())));
$manager->setName('slowshop');
$serviceContainer->setConnectionManager('slowshop', $manager);
$serviceContainer->setDefaultDatasource('slowshop');
Exemplo n.º 23
0
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('dev_main', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'mysql:host=localhost;dbname=dev_main', 'user' => 'root', 'password' => 5143, 'attributes' => array('ATTR_EMULATE_PREPARES' => false)));
$manager->setName('dev_main');
$serviceContainer->setConnectionManager('dev_main', $manager);
$serviceContainer->setDefaultDatasource('dev_main');