use Symfony\Component\OptionsResolver\OptionsResolverInterface; $optionsResolver = new OptionsResolverInterface(); $optionsResolver->setDefaults(array( 'foo' => 'bar', 'baz' => 'qux', ));This will configure default values for two options, "foo" and "baz", with the values "bar" and "qux" respectively. This is useful when you want to provide default values for your application's configuration options, but still allow them to be overridden if necessary. The Symfony\Component\OptionsResolver is the package library for this component.