Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RedisCaster.php

function RedisCaster::castRedisCluster

File

vendor/symfony/var-dumper/Caster/RedisCaster.php, line 88

Class

RedisCaster
Casts Redis class from ext-redis to array representation.

Namespace

Symfony\Component\VarDumper\Caster

Code

public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, bool $isNested) : array {
    $prefix = Caster::PREFIX_VIRTUAL;
    $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER);
    $a += [
        $prefix . '_masters' => $c->_masters(),
        $prefix . '_redir' => $c->_redir(),
        $prefix . 'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()),
        $prefix . 'lastError' => $c->getLastError(),
        $prefix . 'options' => self::getRedisOptions($c, [
            'SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover,
        ]),
    ];
    return $a;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal