The start of something beautiful

This commit is contained in:
2024-09-11 22:48:07 -06:00
parent 45acea47f3
commit f5997ee5ec
5614 changed files with 630696 additions and 0 deletions
@@ -0,0 +1,96 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\Oauth\OauthUserProvider;
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 OrmConfig
{
private $class;
private $managerName;
private $properties;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function class($value): static
{
$this->_usedProperties['class'] = true;
$this->class = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function managerName($value): static
{
$this->_usedProperties['managerName'] = true;
$this->managerName = $value;
return $this;
}
/**
* @return $this
*/
public function properties(string $name, mixed $value): static
{
$this->_usedProperties['properties'] = true;
$this->properties[$name] = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('class', $value)) {
$this->_usedProperties['class'] = true;
$this->class = $value['class'];
unset($value['class']);
}
if (array_key_exists('manager_name', $value)) {
$this->_usedProperties['managerName'] = true;
$this->managerName = $value['manager_name'];
unset($value['manager_name']);
}
if (array_key_exists('properties', $value)) {
$this->_usedProperties['properties'] = true;
$this->properties = $value['properties'];
unset($value['properties']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['class'])) {
$output['class'] = $this->class;
}
if (isset($this->_usedProperties['managerName'])) {
$output['manager_name'] = $this->managerName;
}
if (isset($this->_usedProperties['properties'])) {
$output['properties'] = $this->properties;
}
return $output;
}
}
@@ -0,0 +1,99 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\Oauth;
require_once __DIR__.\DIRECTORY_SEPARATOR.'OauthUserProvider'.\DIRECTORY_SEPARATOR.'OrmConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\Config\Loader\ParamConfigurator;
/**
* This class is automatically generated to help in creating a config.
*/
class OauthUserProviderConfig
{
private $orm;
private $service;
private $oauth;
private $_usedProperties = [];
public function orm(array $value = []): \Symfony\Config\Security\FirewallConfig\Oauth\OauthUserProvider\OrmConfig
{
if (null === $this->orm) {
$this->_usedProperties['orm'] = true;
$this->orm = new \Symfony\Config\Security\FirewallConfig\Oauth\OauthUserProvider\OrmConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "orm()" has already been initialized. You cannot pass values the second time you call orm().');
}
return $this->orm;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function oauth($value): static
{
$this->_usedProperties['oauth'] = true;
$this->oauth = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('orm', $value)) {
$this->_usedProperties['orm'] = true;
$this->orm = new \Symfony\Config\Security\FirewallConfig\Oauth\OauthUserProvider\OrmConfig($value['orm']);
unset($value['orm']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('oauth', $value)) {
$this->_usedProperties['oauth'] = true;
$this->oauth = $value['oauth'];
unset($value['oauth']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['orm'])) {
$output['orm'] = $this->orm->toArray();
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['oauth'])) {
$output['oauth'] = $this->oauth;
}
return $output;
}
}