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

Breadcrumb

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

function AmqpCaster::castExchange

File

vendor/symfony/var-dumper/Caster/AmqpCaster.php, line 128

Class

AmqpCaster
Casts Amqp related classes to array representation.

Namespace

Symfony\Component\VarDumper\Caster

Code

public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested) : array {
    $prefix = Caster::PREFIX_VIRTUAL;
    $a += [
        $prefix . 'flags' => self::extractFlags($c->getFlags()),
    ];
    $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType();
    // Recent version of the extension already expose private properties
    if (isset($a["\x00AMQPExchange\x00name"])) {
        $a["\x00AMQPExchange\x00type"] = $type;
        return $a;
    }
    $a += [
        $prefix . 'connection' => $c->getConnection(),
        $prefix . 'channel' => $c->getChannel(),
        $prefix . 'name' => $c->getName(),
        $prefix . 'type' => $type,
        $prefix . 'arguments' => $c->getArguments(),
    ];
    return $a;
}

API Navigation

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