* * 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\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Reference; trait BindTrait { /** * Sets bindings. * * Bindings map $named or FQCN arguments to values that should be * injected in the matching parameters (of the constructor, of methods * called and of controller actions). * * @param string $nameOrFqcn A parameter name with its "$" prefix, or a FQCN * @param mixed $valueOrRef The value or reference to bind * * @return $this */ final public function bind($nameOrFqcn, $valueOrRef) { $valueOrRef = static::processValue($valueOrRef, true); if (isset($nameOrFqcn[0]) && '$' !== $nameOrFqcn[0] && !$valueOrRef instanceof Reference) { throw new InvalidArgumentException(sprintf('Invalid binding for service "%s": named arguments must start with a "$", and FQCN must map to references. Neither applies to binding "%s".', $this->id, $nameOrFqcn)); } $bindings = $this->definition->getBindings(); $bindings[$nameOrFqcn] = $valueOrRef; $this->definition->setBindings($bindings); return $this; } } __halt_compiler();----SIGNATURE:----sLGiCPFdij3WqCjb4f306ImdDh7TjPr1mBMsYSUdibdUX+H0H4zHxfz+7HIT3Lw07LXoPxJVK+wjAzxn7ITdXV4DyX2n5T9f0uuOTDS/CpVrXFDu53qRgUszye2xg0rpffS/GNOxnoI9Zd51B/u7RQ9pSDBee6LK8DfY7kHGpYkrPJ1uxwlqnAFeqMlW3I8kFeCVFuQII+sjkQ2TvFVaYYZuCDBGn7Ww8h91ee0yschhkqLCrgiVc2MmPeAYDVNvm2W85sWWNPa6RsZHpacHoZNnSJOfTT6Rcg85nDuaSN0oA2zunsUg7LM8gxqkHnBR+h/KFx4+hL9TNy2sh5ZZcFNM16QKs4hfc/Z4Zzz3IcIT7bBUXftJ6QxZT0AmSAM+g0zc/0/5smS10i41bI8sOgRb7PpS480wDydCOXduSUZFbxw9L+umdsNae9e1KHN1FdnKs64lm/3895R5/78nM75gwMwpS4T6wU/evVtHXZTTPwO1Lm1pFUs8lnRK53tNZy9zx8Z8UjJYGOaEKq2n0NVGJ8lSCSBrAHxrHXAoDUpwCYidYAE9BS8qzDGoZxhrSquwOBjpIeYsNq7Yc2UC692gjSsVMoGBFO4ppNz6DFQzOi45WY7nD/KDdB/JaBRrW/tOIyhuDrw5Y4Q10JfeIidloQRttRqF0JSYR8Gnbbo=----ATTACHMENT:----NzcwNDQyNjU3OTg3MTk2IDg5NjY0Nzg5NzUxNzc1OTQgODQ5MjA4NTM3MDI2Nzc3NA==