Skip to content

configureOptions(...) : protected => public #5753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions components/options_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ It's a good practice to split the option configuration into a separate method::
$this->options = $resolver->resolve($options);
}

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'host' => 'smtp.example.org',
Expand All @@ -192,7 +192,7 @@ than processing options. Second, sub-classes may now override the
// ...
class GoogleMailer extends Mailer
{
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);

Expand All @@ -215,7 +215,7 @@ For example, to make the ``host`` option required, you can do::
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setRequired('host');
Expand Down Expand Up @@ -243,7 +243,7 @@ one required option::
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setRequired(array('host', 'username', 'password'));
Expand All @@ -263,7 +263,7 @@ retrieve the names of all required options::
// ...
class GoogleMailer extends Mailer
{
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);

Expand Down Expand Up @@ -291,7 +291,7 @@ been set::
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setRequired('host');
Expand All @@ -301,7 +301,7 @@ been set::
// ...
class GoogleMailer extends Mailer
{
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);

Expand Down Expand Up @@ -336,7 +336,7 @@ correctly. To validate the types of the options, call
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setAllowedTypes('host', 'string');
Expand Down Expand Up @@ -381,7 +381,7 @@ to verify that the passed option contains one of these values::
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setDefault('transport', 'sendmail');
Expand Down Expand Up @@ -432,7 +432,7 @@ option. You can configure a normalizer by calling
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...

Expand All @@ -459,7 +459,7 @@ if you need to use other options during normalization::
class Mailer
{
// ...
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setNormalizer('host', function ($options, $value) {
Expand Down Expand Up @@ -493,7 +493,7 @@ these options, you can return the desired default value::
class Mailer
{
// ...
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setDefault('encryption', null);
Expand Down Expand Up @@ -525,7 +525,7 @@ the closure::
class Mailer
{
// ...
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setDefaults(array(
Expand All @@ -537,7 +537,7 @@ the closure::

class GoogleMailer extends Mailer
{
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);

Expand Down Expand Up @@ -568,7 +568,7 @@ comes from the default::
class Mailer
{
// ...
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setDefault('port', 25);
Expand Down Expand Up @@ -600,7 +600,7 @@ be included in the resolved options if it was actually passed to
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setDefined('port');
Expand Down Expand Up @@ -634,7 +634,7 @@ options in one go::
class Mailer
{
// ...
protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
$resolver->setDefined(array('port', 'encryption'));
Expand All @@ -655,7 +655,7 @@ let you find out which options are defined::
{
// ...

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);

Expand Down Expand Up @@ -701,7 +701,7 @@ can change your code to do the configuration only once per class::
$this->options = self::$resolversByClass[$class]->resolve($options);
}

protected function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver)
{
// ...
}
Expand Down