BarConfig example

 elseif (0 < \func_num_args()) {
            throw new InvalidConfigurationException('The node created by "foo()" has already been initialized. You cannot pass values the second time you call foo().');
        }

        return $this->foo;
    }

    public function bar(array $value = []): \Symfony\Config\ArrayExtraKeys\BarConfig
    {
        $this->_usedProperties['bar'] = true;

        return $this->bar[] = new \Symfony\Config\ArrayExtraKeys\BarConfig($value);
    }

    public function baz(array $value = []): \Symfony\Config\ArrayExtraKeys\BazConfig
    {
        if (null === $this->baz) {
            $this->_usedProperties['baz'] = true;
            $this->baz = new \Symfony\Config\ArrayExtraKeys\BazConfig($value);
        } elseif (0 < \func_num_args()) {
            throw new InvalidConfigurationException('The node created by "baz()" has already been initialized. You cannot pass values the second time you call baz().');
        }

        
Home | Imprint | This part of the site doesn't use cookies.