[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.225.95.117: ~ $
<?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;

/**
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
{
    /**
     * The variables assigned to this view.
     */
    public $vars = [
        'value' => null,
        'attr' => [],
    ];

    /**
     * The parent view.
     */
    public $parent;

    /**
     * The child views.
     *
     * @var FormView[]
     */
    public $children = [];

    /**
     * Is the form attached to this renderer rendered?
     *
     * Rendering happens when either the widget or the row method was called.
     * Row implicitly includes widget, however certain rendering mechanisms
     * have to skip widget rendering when a row is rendered.
     *
     * @var bool
     */
    private $rendered = false;

    private $methodRendered = false;

    public function __construct(self $parent = null)
    {
        $this->parent = $parent;
    }

    /**
     * Returns whether the view was already rendered.
     *
     * @return bool Whether this view's widget is rendered
     */
    public function isRendered()
    {
        if (true === $this->rendered || 0 === \count($this->children)) {
            return $this->rendered;
        }

        foreach ($this->children as $child) {
            if (!$child->isRendered()) {
                return false;
            }
        }

        return $this->rendered = true;
    }

    /**
     * Marks the view as rendered.
     *
     * @return $this
     */
    public function setRendered()
    {
        $this->rendered = true;

        return $this;
    }

    /**
     * @return bool
     */
    public function isMethodRendered()
    {
        return $this->methodRendered;
    }

    public function setMethodRendered()
    {
        $this->methodRendered = true;
    }

    /**
     * Returns a child by name (implements \ArrayAccess).
     *
     * @param string $name The child name
     *
     * @return self The child view
     */
    public function offsetGet($name)
    {
        return $this->children[$name];
    }

    /**
     * Returns whether the given child exists (implements \ArrayAccess).
     *
     * @param string $name The child name
     *
     * @return bool Whether the child view exists
     */
    public function offsetExists($name)
    {
        return isset($this->children[$name]);
    }

    /**
     * Implements \ArrayAccess.
     *
     * @throws BadMethodCallException always as setting a child by name is not allowed
     */
    public function offsetSet($name, $value)
    {
        throw new BadMethodCallException('Not supported.');
    }

    /**
     * Removes a child (implements \ArrayAccess).
     *
     * @param string $name The child name
     */
    public function offsetUnset($name)
    {
        unset($this->children[$name]);
    }

    /**
     * Returns an iterator to iterate over children (implements \IteratorAggregate).
     *
     * @return \ArrayIterator<string, FormView> The iterator
     */
    public function getIterator()
    {
        return new \ArrayIterator($this->children);
    }

    /**
     * Implements \Countable.
     *
     * @return int The number of children views
     */
    public function count()
    {
        return \count($this->children);
    }
}

Filemanager

Name Type Size Permission Actions
ChoiceList Folder 0755
Command Folder 0755
Console Folder 0755
DependencyInjection Folder 0755
Exception Folder 0755
Extension Folder 0755
Guess Folder 0755
Resources Folder 0755
Test Folder 0755
Tests Folder 0755
Util Folder 0755
.gitignore File 34 B 0644
AbstractExtension.php File 4.77 KB 0644
AbstractRendererEngine.php File 7.46 KB 0644
AbstractType.php File 1.28 KB 0644
AbstractTypeExtension.php File 974 B 0644
Button.php File 8.53 KB 0644
ButtonBuilder.php File 16.51 KB 0644
ButtonTypeInterface.php File 462 B 0644
CHANGELOG.md File 18.51 KB 0644
CallbackTransformer.php File 1.02 KB 0644
ClickableInterface.php File 555 B 0644
DataMapperInterface.php File 2.34 KB 0644
DataTransformerInterface.php File 3.79 KB 0644
Form.php File 36.09 KB 0644
FormBuilder.php File 7.28 KB 0644
FormBuilderInterface.php File 1.97 KB 0644
FormConfigBuilder.php File 19.33 KB 0644
FormConfigBuilderInterface.php File 8.03 KB 0644
FormConfigInterface.php File 6.65 KB 0644
FormError.php File 4.14 KB 0644
FormErrorIterator.php File 7.62 KB 0644
FormEvent.php File 1.18 KB 0644
FormEvents.php File 3.29 KB 0644
FormExtensionInterface.php File 1.62 KB 0644
FormFactory.php File 4.17 KB 0644
FormFactoryBuilder.php File 4.17 KB 0644
FormFactoryBuilderInterface.php File 2.31 KB 0644
FormFactoryInterface.php File 3.94 KB 0644
FormInterface.php File 10.02 KB 0644
FormRegistry.php File 5.07 KB 0644
FormRegistryInterface.php File 1.32 KB 0644
FormRenderer.php File 11.55 KB 0644
FormRendererEngineInterface.php File 6.48 KB 0644
FormRendererInterface.php File 3.41 KB 0644
FormTypeExtensionInterface.php File 1.62 KB 0644
FormTypeGuesserChain.php File 2.88 KB 0644
FormTypeGuesserInterface.php File 2.14 KB 0644
FormTypeInterface.php File 3.07 KB 0644
FormView.php File 3.51 KB 0644
Forms.php File 3.76 KB 0644
LICENSE File 1.04 KB 0644
NativeRequestHandler.php File 7.53 KB 0644
PreloadedExtension.php File 2.18 KB 0644
README.md File 488 B 0644
RequestHandlerInterface.php File 860 B 0644
ResolvedFormType.php File 6.75 KB 0644
ResolvedFormTypeFactory.php File 658 B 0644
ResolvedFormTypeFactoryInterface.php File 1.17 KB 0644
ResolvedFormTypeInterface.php File 3.26 KB 0644
ReversedTransformer.php File 1.03 KB 0644
SubmitButton.php File 1.2 KB 0644
SubmitButtonBuilder.php File 624 B 0644
SubmitButtonTypeInterface.php File 474 B 0644
composer.json File 2.05 KB 0644
phpunit.xml.dist File 882 B 0644