Symfony\Component\DependencyInjection\Definition::setArguments PHP Method

setArguments() public method

Sets the arguments to pass to the service constructor/factory method.
public setArguments ( array $arguments ) : Definition
$arguments array An array of arguments
return Definition The current instance
    public function setArguments(array $arguments)
    {
        $this->arguments = $arguments;

        return $this;
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function createDefinition(ContainerBuilder $container, array $config)
 {
     $definition = new Definition('Jose\\Object\\JWK');
     $definition->setFactory([new Reference('jose.factory.jwk'), 'createFromKeySet']);
     $definition->setArguments([new Reference($config['key_set']), $config['index']]);
     return $definition;
 }
All Usage Examples Of Symfony\Component\DependencyInjection\Definition::setArguments