Chris@14: Chris@14: * Chris@14: * For the full copyright and license information, please view the LICENSE Chris@14: * file that was distributed with this source code. Chris@14: */ Chris@14: Chris@14: namespace Symfony\Component\DependencyInjection\Loader\Configurator\Traits; Chris@14: Chris@14: trait ArgumentTrait Chris@14: { Chris@14: /** Chris@14: * Sets the arguments to pass to the service constructor/factory method. Chris@14: * Chris@14: * @param array $arguments An array of arguments Chris@14: * Chris@14: * @return $this Chris@14: */ Chris@14: final public function args(array $arguments) Chris@14: { Chris@14: $this->definition->setArguments(static::processValue($arguments, true)); Chris@14: Chris@14: return $this; Chris@14: } Chris@14: Chris@14: /** Chris@14: * Sets one argument to pass to the service constructor/factory method. Chris@14: * Chris@14: * @param string|int $key Chris@14: * @param mixed $value Chris@14: * Chris@14: * @return $this Chris@14: */ Chris@14: final public function arg($key, $value) Chris@14: { Chris@14: $this->definition->setArgument($key, static::processValue($value, true)); Chris@14: Chris@14: return $this; Chris@14: } Chris@14: }