for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wandu\DI\Providers\Predis;
use Predis\Client;
use Wandu\Config\Contracts\Config;
use Wandu\DI\ContainerInterface;
use Wandu\DI\ServiceProviderInterface;
class PredisServiceProvider implements ServiceProviderInterface
{
/**
* {@inheritdoc}
*/
public function register(ContainerInterface $app)
$app->closure(Client::class, function (Config $config) {
return new Client($config->get('predis.predis'));
});
}
public function boot(ContainerInterface $app)