[Form] Rename UnmodifiableFormConfig to ImmutableFormConfig

This commit is contained in:
Jordi Boggiano 2012-07-20 01:18:42 +02:00
parent 274eb9ebaf
commit c81b2ad3e2
2 changed files with 8 additions and 8 deletions

View File

@ -126,8 +126,8 @@ class Form implements \IteratorAggregate, FormInterface
*/ */
public function __construct(FormConfigInterface $config) public function __construct(FormConfigInterface $config)
{ {
if (!$config instanceof UnmodifiableFormConfig) { if (!$config instanceof ImmutableFormConfig) {
$config = new UnmodifiableFormConfig($config); $config = new ImmutableFormConfig($config);
} }
// Compound forms always need a data mapper, otherwise calls to // Compound forms always need a data mapper, otherwise calls to
@ -152,7 +152,7 @@ class Form implements \IteratorAggregate, FormInterface
/** /**
* Returns the configuration of the form. * Returns the configuration of the form.
* *
* @return UnmodifiableFormConfig The form's immutable configuration. * @return ImmutableFormConfig The form's immutable configuration.
*/ */
public function getConfig() public function getConfig()
{ {

View File

@ -12,14 +12,14 @@
namespace Symfony\Component\Form; namespace Symfony\Component\Form;
use Symfony\Component\Form\Util\PropertyPath; use Symfony\Component\Form\Util\PropertyPath;
use Symfony\Component\EventDispatcher\UnmodifiableEventDispatcher; use Symfony\Component\EventDispatcher\ImmutableEventDispatcher;
/** /**
* A read-only form configuration. * A read-only form configuration.
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
*/ */
class UnmodifiableFormConfig implements FormConfigInterface class ImmutableFormConfig implements FormConfigInterface
{ {
/** /**
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
@ -134,8 +134,8 @@ class UnmodifiableFormConfig implements FormConfigInterface
public function __construct(FormConfigInterface $config) public function __construct(FormConfigInterface $config)
{ {
$dispatcher = $config->getEventDispatcher(); $dispatcher = $config->getEventDispatcher();
if (!$dispatcher instanceof UnmodifiableEventDispatcher) { if (!$dispatcher instanceof ImmutableEventDispatcher) {
$dispatcher = new UnmodifiableEventDispatcher($dispatcher); $dispatcher = new ImmutableEventDispatcher($dispatcher);
} }
$this->dispatcher = $dispatcher; $this->dispatcher = $dispatcher;