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); }
/** * 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'); }
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'); }
<?php if (!isset($configuration) || !$configuration instanceof \Propel\Runtime\Configuration) { $configuration = \Propel\Runtime\Configuration::$globalConfiguration; if (null === $configuration) { $configuration = new \Propel\Runtime\Configuration(); } } $configuration->checkVersion('2.0.0-dev'); $configuration->setAdapterClass('bookstore', 'sqlite'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle($configuration->getAdapter('bookstore')); $manager->setConfiguration(array('dsn' => 'sqlite::memory:', 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper')); $manager->setName('bookstore'); $configuration->setConnectionManager('bookstore', $manager); $configuration->setDefaultDatasource('bookstore'); $configuration->registerEntity('bookstore', array(0 => 'Book', 1 => 'Author')); return $configuration;
<?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');
<?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');
<?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('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');
<?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('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'sqlite::memory:', 'user' => '', 'password' => '', 'attributes' => ['\\Propel\\Runtime\\Connection\\ConnectionWrapper::PROPEL_ATTR_CACHE_PREPARES' => true])); $manager->setName('bookstore'); $serviceContainer->setConnectionManager('bookstore', $manager); $serviceContainer->setDefaultDatasource('bookstore');
<?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=webauthoring.ajou.ac.kr;dbname=SOCIAL_APP_PROJECT_X', 'user' => 'sap15X', 'password' => 'sap15X!', 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper')); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?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');
#session start 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 () {
<?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('default', 'mysql'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration(['dsn' => 'mysql:host=127.0.0.1;dbname=gw', 'user' => 'root', 'password' => '', 'settings' => ['charset' => 'utf8', 'queries' => []], 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper']); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?php $serviceContainer = \Propel\Runtime\Propel::getServiceContainer(); $serviceContainer->checkVersion('2.0.0-dev'); $serviceContainer->setAdapterClass('default', 'sqlite'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration(array('dsn' => 'sqlite:sanitary_netsuite.sqlite', 'user' => '', 'password' => '', 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper')); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?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');
<?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('ATTR_PERSISTENT' => false), 'attributes' => array('\\Propel\\Runtime\\Connection\\ConnectionWrapper::PROPEL_ATTR_CACHE_PREPARES' => true), 'settings' => array('charset' => 'utf8'))); $manager->setName('bookstore'); $serviceContainer->setConnectionManager('bookstore', $manager); $serviceContainer->setDefaultDatasource('bookstore');
<?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');
<?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=aa1dh1qvc7hcrx4.c3s3jhs59qvn.us-west-2.rds.amazonaws.com;dbname=ebdb', 'user' => 'russell', 'password' => 'Telford18', 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper')); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?php use App\Config; $configApp = new Config(); $entorno = $configApp->getBaseDatos(); $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=' . $entorno['host'] . ';dbname=' . $entorno['nombre'] . ';port=' . $entorno['puerto'], 'user' => $entorno['usuario'], 'password' => $entorno['clave'], 'settings' => array('charset' => $entorno['charset'], '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('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?php $serviceContainer = \Propel\Runtime\Propel::getServiceContainer(); $serviceContainer->checkVersion('2.0.0-dev'); $serviceContainer->setAdapterClass('default', 'pgsql'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration(array('classname' => 'Propel\\Runtime\\Connection\\ConnectionWrapper', 'dsn' => 'pgsql:host=192.168.44.94;dbname=bi3', 'user' => 'postgres', 'password' => 'vAy7swuT', 'attributes' => array('ATTR_EMULATE_PREPARES' => false))); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?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');
<?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');
<?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');
<?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('ATTR_PERSISTENT' => false), 'settings' => array('charset' => 'utf8'))); $manager->setName('bookstore'); $serviceContainer->setConnectionManager('bookstore', $manager); $serviceContainer->setDefaultDatasource('bookstore');
date_default_timezone_set('Europe/London'); // To help the built-in PHP dev server, check if the request was actually for // something which should probably be served as a static file if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) { return false; } require __DIR__ . '/../vendor/autoload.php'; session_start(); // Instantiate the app $settings = (require __DIR__ . '/../app/settings.php'); // Load the configuration file $configManager = new \Propel\Common\Config\ConfigurationManager(__DIR__ . '/../propel.php'); // Set up the connection manager $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration($configManager->getConnectionParametersArray()['default']); $manager->setName('default'); // Add the connection manager to the service container $serviceContainer = \Propel\Runtime\Propel::getServiceContainer(); $serviceContainer->setAdapterClass('default', 'mysql'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default'); $app = new \Slim\App($settings); // Set up dependencies require __DIR__ . '/../app/dependencies.php'; // Register middleware require __DIR__ . '/../app/middleware.php'; // Register routes require __DIR__ . '/../app/routes.php'; // Run! $app->run();
<?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' => $_ENV['dsn'], 'user' => $_ENV['username'], 'password' => $_ENV['password'], 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper')); $manager->setName('default'); $serviceContainer->setConnectionManager('default', $manager); $serviceContainer->setDefaultDatasource('default');
<?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');
<?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');
#!/usr/bin/php <?php $config = ['git_urls' => ['https://github.com/yfix/Propel2.git' => 'propel2/'], 'autoload_config' => ['propel2/src/Propel/' => 'Propel'], 'example' => function () { $serviceContainer = \Propel\Runtime\Propel::getServiceContainer(); $serviceContainer->setAdapterClass('bookstore', 'mysql'); $manager = new \Propel\Runtime\Connection\ConnectionManagerSingle(); $manager->setConfiguration(['dsn' => 'mysql:host=localhost;dbname=yf_for_unit_tests', 'user' => 'root', 'password' => '123456']); $serviceContainer->setConnectionManager('bookstore', $manager); var_dump($manager); }]; if ($return_config) { return $config; } require_once __DIR__ . '/_yf_autoloader.php'; new yf_autoloader($config);