* * 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; /** * @method $this parent(string $parent) */ trait ParentTrait { /** * Sets the Definition to inherit from. * * @param string $parent * * @return $this * * @throws InvalidArgumentException when parent cannot be set */ final protected function setParent($parent) { 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); } elseif ($this->definition->isAutoconfigured()) { throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id)); } elseif ($this->definition->getBindings()) { throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also "bind" arguments.', $this->id)); } 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; } } __halt_compiler();----SIGNATURE:----r9l5MZu9blMr8fMj4AXY9jp1LyDEug+iTgC/d7TeG6fWtKIpqLXQX1qVrFenkfZLS9MDBYGhSHiQupP7XnZJALok9e5MW7t8eToI3dtHpbsKTTTB7WZ/7qfyASVP4fVON/3+WPP/+hP8gM/DzaUd3QSi53YjTYewX2iwQlxHBDga9NfHye1CmqTV86nqDRBWdEJFUa5LPXTJesypxjDXhQmt/idm11J7aX0d0Q71TdIVU1NWwkgejRv5tadAe/Hnn8i/rJ2eWGyyAZmNmRIvRHGLulGW/Xqtvbjfreaa0IbhzhR+GEj5A3XfRpvFiUOoJzppMOKVbELEcAFO5Ri/3ecEz8tpvJPcJaqCwcPrl23poOewBcPyxUirrL/t8FNhKOVzJjOHcDvOoJp3X6r9/hysJdnIl40C3BbaI6BG33GyIhSNIrrQYW5MyQa84+Xq/Nlnv1oNv54JEw6lvtmbIvo3oFMbONMPkq8fGaxRIlEwpYKMjPsStm+qtFs5ZFLj2mXkMW3IUbDkb4ytx/1hps1c94UT7ENNu5xSfU0P8tMMAAYGKrF7UgTS6EoqQeVVjnmAkT75hnP23txhVeTWQqwSto956ET8A9q9Dua+C63PQQvaoXF2CDBpegV7xW/F2zSpGf5aRu4Poo012nsHRGmABawfGdN3wrFL6Ilmdjk=----ATTACHMENT:----OTEwNTU4NDM5ODAyMjMyNSA4NjcyOTM3Njg2OTg5MDc3IDQwMjc2MTc0Mzg4Mzg1NTc=