database.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /*
  3. * This file is part of the Cygnite package.
  4. *
  5. * (c) Sanjoy Dey <[email protected]>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Cygnite\Database;
  11. if (!defined('CF_SYSTEM')) {
  12. exit('External script access not allowed');
  13. }
  14. /**
  15. * Initialize your database configurations settings here.
  16. * You can connect with multiple database on the fly.
  17. * Don't worry about performance Cygnite will not
  18. * connect with database until first time you need your
  19. * connection to interact with database.
  20. * Specify your database name and table name in model to
  21. * do crude operations.
  22. *
  23. * Please protect this file to have maximum security.
  24. */
  25. Configuration::initialize(
  26. function ($config) {
  27. $config->default = 'db';
  28. $config->setConfig(
  29. array(
  30. 'db' => array(
  31. 'driver' => 'mysql',
  32. 'host' => '127.0.0.1',
  33. 'port' => '',
  34. 'database' => 'hello_world',
  35. 'username' => 'benchmarkdbuser',
  36. 'password' => 'benchmarkdbpass',
  37. 'charset' => 'utf8'
  38. )
  39. /*'db1' => array(
  40. 'driver' => 'mysql',
  41. 'host' => 'localhost',
  42. 'port' => '',
  43. 'database' => '',
  44. 'username' => '',
  45. 'password' => '',
  46. 'charset' => 'utf8'
  47. )*/
  48. )
  49. );
  50. }
  51. );