init
This commit is contained in:
247
backend/var/cache/dev/Symfony/Config/Framework/MessengerConfig.php
vendored
Normal file
247
backend/var/cache/dev/Symfony/Config/Framework/MessengerConfig.php
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
|
||||
namespace Symfony\Config\Framework;
|
||||
|
||||
require_once __DIR__.\DIRECTORY_SEPARATOR.'Messenger'.\DIRECTORY_SEPARATOR.'RoutingConfig.php';
|
||||
require_once __DIR__.\DIRECTORY_SEPARATOR.'Messenger'.\DIRECTORY_SEPARATOR.'SerializerConfig.php';
|
||||
require_once __DIR__.\DIRECTORY_SEPARATOR.'Messenger'.\DIRECTORY_SEPARATOR.'TransportConfig.php';
|
||||
require_once __DIR__.\DIRECTORY_SEPARATOR.'Messenger'.\DIRECTORY_SEPARATOR.'BusConfig.php';
|
||||
|
||||
use Symfony\Component\Config\Loader\ParamConfigurator;
|
||||
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
|
||||
|
||||
/**
|
||||
* This class is automatically generated to help in creating a config.
|
||||
*/
|
||||
class MessengerConfig
|
||||
{
|
||||
private $enabled;
|
||||
private $routing;
|
||||
private $serializer;
|
||||
private $transports;
|
||||
private $failureTransport;
|
||||
private $stopWorkerOnSignals;
|
||||
private $defaultBus;
|
||||
private $buses;
|
||||
private $_usedProperties = [];
|
||||
|
||||
/**
|
||||
* @default false
|
||||
* @param ParamConfigurator|bool $value
|
||||
* @return $this
|
||||
*/
|
||||
public function enabled($value): static
|
||||
{
|
||||
$this->_usedProperties['enabled'] = true;
|
||||
$this->enabled = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @template TValue of string|array
|
||||
* @param TValue $value
|
||||
* @return \Symfony\Config\Framework\Messenger\RoutingConfig|$this
|
||||
* @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\RoutingConfig : static)
|
||||
*/
|
||||
public function routing(string $message_class, string|array $value = []): \Symfony\Config\Framework\Messenger\RoutingConfig|static
|
||||
{
|
||||
if (!\is_array($value)) {
|
||||
$this->_usedProperties['routing'] = true;
|
||||
$this->routing[$message_class] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
if (!isset($this->routing[$message_class]) || !$this->routing[$message_class] instanceof \Symfony\Config\Framework\Messenger\RoutingConfig) {
|
||||
$this->_usedProperties['routing'] = true;
|
||||
$this->routing[$message_class] = new \Symfony\Config\Framework\Messenger\RoutingConfig($value);
|
||||
} elseif (1 < \func_num_args()) {
|
||||
throw new InvalidConfigurationException('The node created by "routing()" has already been initialized. You cannot pass values the second time you call routing().');
|
||||
}
|
||||
|
||||
return $this->routing[$message_class];
|
||||
}
|
||||
|
||||
/**
|
||||
* @default {"default_serializer":"messenger.transport.native_php_serializer","symfony_serializer":{"format":"json","context":[]}}
|
||||
*/
|
||||
public function serializer(array $value = []): \Symfony\Config\Framework\Messenger\SerializerConfig
|
||||
{
|
||||
if (null === $this->serializer) {
|
||||
$this->_usedProperties['serializer'] = true;
|
||||
$this->serializer = new \Symfony\Config\Framework\Messenger\SerializerConfig($value);
|
||||
} elseif (0 < \func_num_args()) {
|
||||
throw new InvalidConfigurationException('The node created by "serializer()" has already been initialized. You cannot pass values the second time you call serializer().');
|
||||
}
|
||||
|
||||
return $this->serializer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @template TValue of string|array
|
||||
* @param TValue $value
|
||||
* @return \Symfony\Config\Framework\Messenger\TransportConfig|$this
|
||||
* @psalm-return (TValue is array ? \Symfony\Config\Framework\Messenger\TransportConfig : static)
|
||||
*/
|
||||
public function transport(string $name, string|array $value = []): \Symfony\Config\Framework\Messenger\TransportConfig|static
|
||||
{
|
||||
if (!\is_array($value)) {
|
||||
$this->_usedProperties['transports'] = true;
|
||||
$this->transports[$name] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
if (!isset($this->transports[$name]) || !$this->transports[$name] instanceof \Symfony\Config\Framework\Messenger\TransportConfig) {
|
||||
$this->_usedProperties['transports'] = true;
|
||||
$this->transports[$name] = new \Symfony\Config\Framework\Messenger\TransportConfig($value);
|
||||
} elseif (1 < \func_num_args()) {
|
||||
throw new InvalidConfigurationException('The node created by "transport()" has already been initialized. You cannot pass values the second time you call transport().');
|
||||
}
|
||||
|
||||
return $this->transports[$name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport name to send failed messages to (after all retries have failed).
|
||||
* @default null
|
||||
* @param ParamConfigurator|mixed $value
|
||||
* @return $this
|
||||
*/
|
||||
public function failureTransport($value): static
|
||||
{
|
||||
$this->_usedProperties['failureTransport'] = true;
|
||||
$this->failureTransport = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ParamConfigurator|list<ParamConfigurator|mixed>|int|string $value
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function stopWorkerOnSignals(ParamConfigurator|int|string|array $value): static
|
||||
{
|
||||
$this->_usedProperties['stopWorkerOnSignals'] = true;
|
||||
$this->stopWorkerOnSignals = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @default null
|
||||
* @param ParamConfigurator|mixed $value
|
||||
* @return $this
|
||||
*/
|
||||
public function defaultBus($value): static
|
||||
{
|
||||
$this->_usedProperties['defaultBus'] = true;
|
||||
$this->defaultBus = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @default {"messenger.bus.default":{"default_middleware":{"enabled":true,"allow_no_handlers":false,"allow_no_senders":true},"middleware":[]}}
|
||||
*/
|
||||
public function bus(string $name, array $value = []): \Symfony\Config\Framework\Messenger\BusConfig
|
||||
{
|
||||
if (!isset($this->buses[$name])) {
|
||||
$this->_usedProperties['buses'] = true;
|
||||
$this->buses[$name] = new \Symfony\Config\Framework\Messenger\BusConfig($value);
|
||||
} elseif (1 < \func_num_args()) {
|
||||
throw new InvalidConfigurationException('The node created by "bus()" has already been initialized. You cannot pass values the second time you call bus().');
|
||||
}
|
||||
|
||||
return $this->buses[$name];
|
||||
}
|
||||
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
if (array_key_exists('enabled', $config)) {
|
||||
$this->_usedProperties['enabled'] = true;
|
||||
$this->enabled = $config['enabled'];
|
||||
unset($config['enabled']);
|
||||
}
|
||||
|
||||
if (array_key_exists('routing', $config)) {
|
||||
$this->_usedProperties['routing'] = true;
|
||||
$this->routing = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Messenger\RoutingConfig($v) : $v, $config['routing']);
|
||||
unset($config['routing']);
|
||||
}
|
||||
|
||||
if (array_key_exists('serializer', $config)) {
|
||||
$this->_usedProperties['serializer'] = true;
|
||||
$this->serializer = new \Symfony\Config\Framework\Messenger\SerializerConfig($config['serializer']);
|
||||
unset($config['serializer']);
|
||||
}
|
||||
|
||||
if (array_key_exists('transports', $config)) {
|
||||
$this->_usedProperties['transports'] = true;
|
||||
$this->transports = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Framework\Messenger\TransportConfig($v) : $v, $config['transports']);
|
||||
unset($config['transports']);
|
||||
}
|
||||
|
||||
if (array_key_exists('failure_transport', $config)) {
|
||||
$this->_usedProperties['failureTransport'] = true;
|
||||
$this->failureTransport = $config['failure_transport'];
|
||||
unset($config['failure_transport']);
|
||||
}
|
||||
|
||||
if (array_key_exists('stop_worker_on_signals', $config)) {
|
||||
$this->_usedProperties['stopWorkerOnSignals'] = true;
|
||||
$this->stopWorkerOnSignals = $config['stop_worker_on_signals'];
|
||||
unset($config['stop_worker_on_signals']);
|
||||
}
|
||||
|
||||
if (array_key_exists('default_bus', $config)) {
|
||||
$this->_usedProperties['defaultBus'] = true;
|
||||
$this->defaultBus = $config['default_bus'];
|
||||
unset($config['default_bus']);
|
||||
}
|
||||
|
||||
if (array_key_exists('buses', $config)) {
|
||||
$this->_usedProperties['buses'] = true;
|
||||
$this->buses = array_map(fn ($v) => new \Symfony\Config\Framework\Messenger\BusConfig($v), $config['buses']);
|
||||
unset($config['buses']);
|
||||
}
|
||||
|
||||
if ($config) {
|
||||
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config)));
|
||||
}
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
$output = [];
|
||||
if (isset($this->_usedProperties['enabled'])) {
|
||||
$output['enabled'] = $this->enabled;
|
||||
}
|
||||
if (isset($this->_usedProperties['routing'])) {
|
||||
$output['routing'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Messenger\RoutingConfig ? $v->toArray() : $v, $this->routing);
|
||||
}
|
||||
if (isset($this->_usedProperties['serializer'])) {
|
||||
$output['serializer'] = $this->serializer->toArray();
|
||||
}
|
||||
if (isset($this->_usedProperties['transports'])) {
|
||||
$output['transports'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Framework\Messenger\TransportConfig ? $v->toArray() : $v, $this->transports);
|
||||
}
|
||||
if (isset($this->_usedProperties['failureTransport'])) {
|
||||
$output['failure_transport'] = $this->failureTransport;
|
||||
}
|
||||
if (isset($this->_usedProperties['stopWorkerOnSignals'])) {
|
||||
$output['stop_worker_on_signals'] = $this->stopWorkerOnSignals;
|
||||
}
|
||||
if (isset($this->_usedProperties['defaultBus'])) {
|
||||
$output['default_bus'] = $this->defaultBus;
|
||||
}
|
||||
if (isset($this->_usedProperties['buses'])) {
|
||||
$output['buses'] = array_map(fn ($v) => $v->toArray(), $this->buses);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user