Current Path: > > opt > cloudlinux > alt-php55 > root > usr > share > pear > Symfony > Component > Form >
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
Exception | Directory | - | - | |
Extension | Directory | - | - | |
Guess | Directory | - | - | |
Resources | Directory | - | - | |
Test | Directory | - | - | |
Util | Directory | - | - | |
AbstractExtension.php | File | 4885 bytes | December 18 2019 11:24:06. | |
AbstractRendererEngine.php | File | 7634 bytes | December 18 2019 11:24:06. | |
AbstractType.php | File | 1080 bytes | December 18 2019 11:24:06. | |
AbstractTypeExtension.php | File | 993 bytes | December 18 2019 11:24:06. | |
Button.php | File | 8826 bytes | December 18 2019 11:24:06. | |
ButtonBuilder.php | File | 18523 bytes | December 18 2019 11:24:06. | |
ButtonTypeInterface.php | File | 462 bytes | December 18 2019 11:24:06. | |
CallbackTransformer.php | File | 2138 bytes | December 18 2019 11:24:06. | |
ClickableInterface.php | File | 559 bytes | December 18 2019 11:24:06. | |
DataMapperInterface.php | File | 1130 bytes | December 18 2019 11:24:06. | |
DataTransformerInterface.php | File | 3159 bytes | December 18 2019 11:24:06. | |
Form.php | File | 34865 bytes | December 18 2019 11:24:06. | |
FormBuilder.php | File | 7871 bytes | December 18 2019 11:24:06. | |
FormBuilderInterface.php | File | 2335 bytes | December 18 2019 11:24:06. | |
FormConfigBuilder.php | File | 21680 bytes | December 18 2019 11:24:06. | |
FormConfigBuilderInterface.php | File | 8666 bytes | December 18 2019 11:24:06. | |
FormConfigInterface.php | File | 6437 bytes | December 18 2019 11:24:06. | |
FormError.php | File | 2563 bytes | December 18 2019 11:24:06. | |
FormEvent.php | File | 1247 bytes | December 18 2019 11:24:06. | |
FormEvents.php | File | 1140 bytes | December 18 2019 11:24:06. | |
FormExtensionInterface.php | File | 1668 bytes | December 18 2019 11:24:06. | |
FormFactory.php | File | 5225 bytes | December 18 2019 11:24:06. | |
FormFactoryBuilder.php | File | 3609 bytes | December 18 2019 11:24:06. | |
FormFactoryBuilderInterface.php | File | 3058 bytes | December 18 2019 11:24:06. | |
FormFactoryInterface.php | File | 4244 bytes | December 18 2019 11:24:06. | |
FormInterface.php | File | 8328 bytes | December 18 2019 11:24:06. | |
FormRegistry.php | File | 4753 bytes | December 18 2019 11:24:06. | |
FormRegistryInterface.php | File | 1442 bytes | December 18 2019 11:24:06. | |
FormRenderer.php | File | 11954 bytes | December 18 2019 11:24:06. | |
FormRendererEngineInterface.php | File | 7063 bytes | December 18 2019 11:24:06. | |
FormRendererInterface.php | File | 3279 bytes | December 18 2019 11:24:06. | |
FormTypeExtensionInterface.php | File | 2125 bytes | December 18 2019 11:24:06. | |
FormTypeGuesserChain.php | File | 2880 bytes | December 18 2019 11:24:06. | |
FormTypeGuesserInterface.php | File | 2170 bytes | December 18 2019 11:24:06. | |
FormTypeInterface.php | File | 3222 bytes | December 18 2019 11:24:06. | |
FormView.php | File | 3524 bytes | December 18 2019 11:24:06. | |
Forms.php | File | 5899 bytes | December 18 2019 11:24:06. | |
NativeRequestHandler.php | File | 5612 bytes | December 18 2019 11:24:06. | |
PreloadedExtension.php | File | 2317 bytes | December 18 2019 11:24:06. | |
RequestHandlerInterface.php | File | 668 bytes | December 18 2019 11:24:06. | |
ResolvedFormType.php | File | 7662 bytes | December 18 2019 11:24:06. | |
ResolvedFormTypeFactory.php | File | 658 bytes | December 18 2019 11:24:06. | |
ResolvedFormTypeFactoryInterface.php | File | 1302 bytes | December 18 2019 11:24:06. | |
ResolvedFormTypeInterface.php | File | 3307 bytes | December 18 2019 11:24:06. | |
ReversedTransformer.php | File | 1256 bytes | December 18 2019 11:24:06. | |
SubmitButton.php | File | 1137 bytes | December 18 2019 11:24:06. | |
SubmitButtonBuilder.php | File | 624 bytes | December 18 2019 11:24:06. | |
SubmitButtonTypeInterface.php | File | 474 bytes | December 18 2019 11:24:06. | |
autoloader.php | File | 334 bytes | December 18 2019 11:24:06. |
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form; use Symfony\Component\Form\Exception\BadMethodCallException; use Symfony\Component\Form\Exception\InvalidArgumentException; use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * A builder for creating {@link Form} instances. * * @author Bernhard Schussek <bschussek@gmail.com> */ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormBuilderInterface { /** * The children of the form builder. * * @var FormBuilderInterface[] */ private $children = array(); /** * The data of children who haven't been converted to form builders yet. * * @var array */ private $unresolvedChildren = array(); /** * Creates a new form builder. * * @param string $name * @param string $dataClass * @param EventDispatcherInterface $dispatcher * @param FormFactoryInterface $factory * @param array $options */ public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, FormFactoryInterface $factory, array $options = array()) { parent::__construct($name, $dataClass, $dispatcher, $options); $this->setFormFactory($factory); } /** * {@inheritdoc} */ public function add($child, $type = null, array $options = array()) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } if ($child instanceof self) { $this->children[$child->getName()] = $child; // In case an unresolved child with the same name exists unset($this->unresolvedChildren[$child->getName()]); return $this; } if (!is_string($child) && !is_int($child)) { throw new UnexpectedTypeException($child, 'string, integer or Symfony\Component\Form\FormBuilder'); } if (null !== $type && !is_string($type) && !$type instanceof FormTypeInterface) { throw new UnexpectedTypeException($type, 'string or Symfony\Component\Form\FormTypeInterface'); } // Add to "children" to maintain order $this->children[$child] = null; $this->unresolvedChildren[$child] = array( 'type' => $type, 'options' => $options, ); return $this; } /** * {@inheritdoc} */ public function create($name, $type = null, array $options = array()) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } if (null === $type && null === $this->getDataClass()) { $type = 'text'; } if (null !== $type) { return $this->getFormFactory()->createNamedBuilder($name, $type, null, $options); } return $this->getFormFactory()->createBuilderForProperty($this->getDataClass(), $name, null, $options); } /** * {@inheritdoc} */ public function get($name) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } if (isset($this->unresolvedChildren[$name])) { return $this->resolveChild($name); } if (isset($this->children[$name])) { return $this->children[$name]; } throw new InvalidArgumentException(sprintf('The child with the name "%s" does not exist.', $name)); } /** * {@inheritdoc} */ public function remove($name) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } unset($this->unresolvedChildren[$name]); if (array_key_exists($name, $this->children)) { unset($this->children[$name]); } return $this; } /** * {@inheritdoc} */ public function has($name) { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } if (isset($this->unresolvedChildren[$name])) { return true; } if (isset($this->children[$name])) { return true; } return false; } /** * {@inheritdoc} */ public function all() { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } $this->resolveChildren(); return $this->children; } /** * {@inheritdoc} */ public function count() { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } return count($this->children); } /** * {@inheritdoc} */ public function getFormConfig() { $config = parent::getFormConfig(); $config->children = array(); $config->unresolvedChildren = array(); return $config; } /** * {@inheritdoc} */ public function getForm() { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } $this->resolveChildren(); $form = new Form($this->getFormConfig()); foreach ($this->children as $child) { // Automatic initialization is only supported on root forms $form->add($child->setAutoInitialize(false)->getForm()); } if ($this->getAutoInitialize()) { // Automatically initialize the form if it is configured so $form->initialize(); } return $form; } /** * {@inheritdoc} */ public function getIterator() { if ($this->locked) { throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.'); } return new \ArrayIterator($this->children); } /** * Converts an unresolved child into a {@link FormBuilder} instance. * * @param string $name The name of the unresolved child. * * @return FormBuilder The created instance. */ private function resolveChild($name) { $info = $this->unresolvedChildren[$name]; $child = $this->create($name, $info['type'], $info['options']); $this->children[$name] = $child; unset($this->unresolvedChildren[$name]); return $child; } /** * Converts all unresolved children into {@link FormBuilder} instances. */ private function resolveChildren() { foreach ($this->unresolvedChildren as $name => $info) { $this->children[$name] = $this->create($name, $info['type'], $info['options']); } $this->unresolvedChildren = array(); } }
SILENT KILLER Tool