[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)
{
if (!$config instanceof UnmodifiableFormConfig) {
$config = new UnmodifiableFormConfig($config);
if (!$config instanceof ImmutableFormConfig) {
$config = new ImmutableFormConfig($config);
}
// 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.
*
* @return UnmodifiableFormConfig The form's immutable configuration.
* @return ImmutableFormConfig The form's immutable configuration.
*/
public function getConfig()
{
@ -562,7 +562,7 @@ class Form implements \IteratorAggregate, FormInterface
// Synchronize representations - must not change the content!
$modelData = $this->normToModel($normData);
$viewData = $this->normToView($normData);
$synchronized = true;
} catch (TransformationFailedException $e) {
}

View File

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