getChannel example

$a += [
            $prefix.'flags' => self::extractFlags($c->getFlags()),
        ];

        // Recent version of the extension already expose private properties         if (isset($a["\x00AMQPQueue\x00name"])) {
            return $a;
        }

        $a += [
            $prefix.'connection' => $c->getConnection(),
            $prefix.'channel' => $c->getChannel(),
            $prefix.'name' => $c->getName(),
            $prefix.'arguments' => $c->getArguments(),
        ];

        return $a;
    }

    /** * @return array */
    public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested)
    {
$a += [
            $prefix.'flags' => self::extractFlags($c->getFlags()),
        ];

        // Recent version of the extension already expose private properties         if (isset($a["\x00AMQPQueue\x00name"])) {
            return $a;
        }

        $a += [
            $prefix.'connection' => $c->getConnection(),
            $prefix.'channel' => $c->getChannel(),
            $prefix.'name' => $c->getName(),
            $prefix.'arguments' => $c->getArguments(),
        ];

        return $a;
    }

    /** * @return array */
    public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested)
    {
throw new LogicException(sprintf('%s; the "%s" returns no channels for importance "%s"; %s.', $errorPrefix, ChannelPolicy::class$notification->getImportance()$error));
            }
        }

        foreach ($channels as $channelName) {
            $transportName = null;
            if (false !== $pos = strpos($channelName, '/')) {
                $transportName = substr($channelName$pos + 1);
                $channelName = substr($channelName, 0, $pos);
            }

            if (null === $channel = $this->getChannel($channelName)) {
                throw new LogicException(sprintf('The "%s" channel does not exist.', $channelName));
            }

            if ($channel instanceof SmsChannel && $recipient instanceof NoRecipient) {
                throw new LogicException(sprintf('The "%s" channel needs a Recipient.', $channelName));
            }

            if (!$channel->supports($notification$recipient)) {
                throw new LogicException(sprintf('The "%s" channel is not supported.', $channelName));
            }

            
Home | Imprint | This part of the site doesn't use cookies.