function AmqpCaster::castChannel
File
-
vendor/
symfony/ var-dumper/ Caster/ AmqpCaster.php, line 82
Class
- AmqpCaster
- Casts Amqp related classes to array representation.
Namespace
Symfony\Component\VarDumper\CasterCode
public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, bool $isNested) : array {
$prefix = Caster::PREFIX_VIRTUAL;
$a += [
$prefix . 'is_connected' => $c->isConnected(),
$prefix . 'channel_id' => $c->getChannelId(),
];
// Recent version of the extension already expose private properties
if (isset($a["\x00AMQPChannel\x00connection"])) {
return $a;
}
$a += [
$prefix . 'connection' => $c->getConnection(),
$prefix . 'prefetch_size' => $c->getPrefetchSize(),
$prefix . 'prefetch_count' => $c->getPrefetchCount(),
];
return $a;
}