PURE CONFIGURATION在ZF2中意味着什么?

I was going through Form Creation in ZF2 and I read the following statement. " You can create the entire form, and input filter, using the Factory. This is particularly nice if you want to store your forms as pure configuration; you can simply pass the configuration to the factory and be done." Can anybody tell in detail what does PURE CONFIGURATION mean?

It means that you're able to store your forms within any config file, e.g. module.config.php and then pass this configuration key into the form factory. This is similar what has been done in ZF1 often times, too.

This whole process is done through the Zend\Form\Factory and if you check out the source code you'll see that you could pass it the following array to create a Form

$someConfig = array(
  'form-key-name' => array(
    'fieldsets' => array(
        'fieldset_1' => array(
            'elements' => array(
                'elem_x' => array(/** Single Form-Element Array*/)
            ),
            'fieldsets' => array(
                'fs_y' => array(/** More Sub-Fieldset Array*/)
            ),
        )
    )
  )
);

Note that this example is quite incomplete (missing name => foo), hydrator configuration, inputFilter configuration, etc... but as it is this should give you a idea of what's meant by that statement.

Using the above-mentioned configuration then you can pass it to the factory

$factory = new \Zend\Form\Factory();
$form    = $factory->createForm($someConfig['form-key-name']);