__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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\DependencyInjection\Loader\Configurator\Traits;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
trait ParentTrait
{
/**
* Sets the Definition to inherit from.
*
* @return $this
*
* @throws InvalidArgumentException when parent cannot be set
*/
final public function parent(string $parent): static
{
if (!$this->allowParent) {
throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id));
}
if ($this->definition instanceof ChildDefinition) {
$this->definition->setParent($parent);
} else {
// cast Definition to ChildDefinition
$definition = serialize($this->definition);
$definition = substr_replace($definition, '53', 2, 2);
$definition = substr_replace($definition, 'Child', 44, 0);
$definition = unserialize($definition);
$this->definition = $definition->setParent($parent);
}
return $this;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AbstractTrait.php | File | 651 B | 0644 |
|
| ArgumentTrait.php | File | 940 B | 0644 |
|
| AutoconfigureTrait.php | File | 808 B | 0644 |
|
| AutowireTrait.php | File | 574 B | 0644 |
|
| BindTrait.php | File | 1.53 KB | 0644 |
|
| CallTrait.php | File | 1.05 KB | 0644 |
|
| ClassTrait.php | File | 547 B | 0644 |
|
| ConfiguratorTrait.php | File | 767 B | 0644 |
|
| ConstructorTrait.php | File | 583 B | 0644 |
|
| DecorateTrait.php | File | 1.08 KB | 0644 |
|
| DeprecateTrait.php | File | 1.07 KB | 0644 |
|
| FactoryTrait.php | File | 1.29 KB | 0644 |
|
| FileTrait.php | File | 569 B | 0644 |
|
| FromCallableTrait.php | File | 2.43 KB | 0644 |
|
| LazyTrait.php | File | 821 B | 0644 |
|
| ParentTrait.php | File | 1.42 KB | 0644 |
|
| PropertyTrait.php | File | 605 B | 0644 |
|
| PublicTrait.php | File | 658 B | 0644 |
|
| ShareTrait.php | File | 573 B | 0644 |
|
| SyntheticTrait.php | File | 665 B | 0644 |
|
| TagTrait.php | File | 1.46 KB | 0644 |
|