Spaces:
Runtime error
Runtime error
Download var/cache/dev/Symfony/Config/Framework/WebhookConfig.php from Alcazard/vibe-coding-api: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/var/cache/dev/Symfony/Config/Framework/WebhookConfig.php
- Command line
-
hf download hf://spaces/Alcazard/vibe-coding-api/var/cache/dev/Symfony/Config/Framework/WebhookConfig.php
-
curl -L -o WebhookConfig.php https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/var/cache/dev/Symfony/Config/Framework/WebhookConfig.php
3.12 kB
| namespace Symfony\Config\Framework; | |
| require_once __DIR__.\DIRECTORY_SEPARATOR.'Webhook'.\DIRECTORY_SEPARATOR.'RoutingConfig.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 WebhookConfig | |
| { | |
| private $enabled; | |
| private $messageBus; | |
| private $routing; | |
| private $_usedProperties = []; | |
| /** | |
| * @default false | |
| * @param ParamConfigurator|bool $value | |
| * @return $this | |
| */ | |
| public function enabled($value): static | |
| { | |
| $this->_usedProperties['enabled'] = true; | |
| $this->enabled = $value; | |
| return $this; | |
| } | |
| /** | |
| * The message bus to use. | |
| * @default 'messenger.default_bus' | |
| * @param ParamConfigurator|mixed $value | |
| * @return $this | |
| */ | |
| public function messageBus($value): static | |
| { | |
| $this->_usedProperties['messageBus'] = true; | |
| $this->messageBus = $value; | |
| return $this; | |
| } | |
| public function routing(string $type, array $value = []): \Symfony\Config\Framework\Webhook\RoutingConfig | |
| { | |
| if (!isset($this->routing[$type])) { | |
| $this->_usedProperties['routing'] = true; | |
| $this->routing[$type] = new \Symfony\Config\Framework\Webhook\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[$type]; | |
| } | |
| 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('message_bus', $config)) { | |
| $this->_usedProperties['messageBus'] = true; | |
| $this->messageBus = $config['message_bus']; | |
| unset($config['message_bus']); | |
| } | |
| if (array_key_exists('routing', $config)) { | |
| $this->_usedProperties['routing'] = true; | |
| $this->routing = array_map(fn ($v) => new \Symfony\Config\Framework\Webhook\RoutingConfig($v), $config['routing']); | |
| unset($config['routing']); | |
| } | |
| 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['messageBus'])) { | |
| $output['message_bus'] = $this->messageBus; | |
| } | |
| if (isset($this->_usedProperties['routing'])) { | |
| $output['routing'] = array_map(fn ($v) => $v->toArray(), $this->routing); | |
| } | |
| return $output; | |
| } | |
| } | |