uecode / connection-manager
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/uecode/connection-manager
Requires
- php: >=5.3.3
- doctrine/dbal: 2.4.*@dev
- symfony/yaml: 2.3.*@dev
This package is auto-updated.
Last update: 2019-02-20 19:26:40 UTC
README
Install:
To Install this, just run the shell code below.
git clone git@github.com:aequasi/ConnectionManager.git
cd ConnectionManager
composer install
OR, if you are using composer
composer require aequasi/connection-manager dev-master
In your php file, add this at the top, changing the path to wherever it belongs
// If you arent using composer in your global project, make sure you use the autoloader require_once( __DIR__ . '/ConnectionManager/vendor/autoload.php' ); use Aequasi\ConnectionManager;
Then, make a yml config file (placing it wherever you need) that looks like ConnectionManager/src/Aequasi/ConnectionManager/Resources/config/connection.yml
Use:
In your code, that has the required above, follow this example:
ConnectionManager::$config = $customConfigFilename; $classDb = ConnectionManager::getConnection( 'classdb', 'someuser', 'somepassword' ); $result = $classDb->executeQuery( $query )->fetchAll();