Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $config->set([
- 'database' => function() {
- static $connection;
- if (!isset($connection)) {
- $connection = new PDO(...);
- }
- return $connection;
- },
- 'solr' => function() {
- static $connection;
- if (!isset($connection)) {
- $connection = new Solarium\Client(...);
- }
- return $connection;
- },
- 'cache' => function() {
- static $connection;
- if (!isset($connection)) {
- $connection = new Memcache(...);
- }
- return $connection;
- },
- ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement