* * 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:----B3b3geGKs5v+dCPg9F9iBAK32t3Zo8QjJxhs+f1f3TaLLM2ZFdt/OBDPyjop9Hqetq/OoiqcTyyXkubIpehB4En14mr1U7hZ/IBr3y/qTg+KP4lv4aj2p8WmgVKf8grGnS6mUPL60Vwi1U8Xu2XRmgOeFBz5aCNs+j7r+wmm5pss0WXqCgVtDys6gWB8Pfo8X/HtlAX1y3LCxuU+C8ZwB0yE0goi+pJHE5p3E0GR8MV4oPZck4wlQFX1n2QE5o9vtpoqXh3YO4JKmR5JHMUE86RbtWFiONEmcEuZKcqMNBPQ2JIXMpgSPXRb6CTHFo0QI5H2+Fw2eRZGX/XOcfHHNK/hevKDFK0JynzymlzcAsmNNJ14oJ59KXp+fK4AfF+ZigcjGjAfiBu5esD2uMynRfVkRC7QfwBPqSXjZSq3kZGk03xEePUJhJga/ix4f07elJsf3GOofcYWr0RxxQrhBwbYkBubMsOzrsNWx4r6WQMwD/kywio3S+ryji3U2pXlG1B8PLcUg1Uf6IFMEPKFK3Dn5ELGSIXj+oEQKBa4NMA0DTtNQZgbGW9/dzm4GiU6yKx9iC0FeOYd1RiZjgypqSj1x4Hgvuwxy1i7NMB+SJVl/p5jGt+s23wMTTxToSHGaTt/28CwniCQzTWoVcpoZX93jPd3yuE8/e1NMD2RF0U=----ATTACHMENT:----NTEzNTk2NTIxODU3MjQ0OSA0OTgyMjYzMzc4Nzk4MTgyIDQ1NTAyNTU3NTMwNDU5Nzk=