Resque\Logger\Handler\Connector\RedisConnector::resolve PHP Метод

resolve() публичный Метод

public resolve ( Command $command, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, array $args )
$command Symfony\Component\Console\Command\Command
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
$args array
    public function resolve(Command $command, InputInterface $input, OutputInterface $output, array $args)
    {
        $options = array('scheme' => 'tcp', 'host' => $args['host'], 'port' => $args['port']);
        $password = Resque::getConfig('redis.password', Resque\Redis::DEFAULT_PASSWORD);
        if ($password !== null && $password !== false && trim($password) !== '') {
            $options['password'] = $password;
        }
        $redis = new \Predis\Client($options);
        $namespace = Resque::getConfig('redis.namespace', Resque\Redis::DEFAULT_NS);
        if (substr($namespace, -1) !== ':') {
            $namespace .= ':';
        }
        $key = $this->replacePlaceholders($args['key']);
        if (strpos($key, $namespace) !== 0) {
            $key = $namespace . $key;
        }
        return new RedisHandler($redis, $key);
    }
RedisConnector