This is the 1st time to touch Zend Framework, I’m user zf2 now, want to practise to use 3rd-party modules, ZfcUser is commonly thought to be a proper one.
Now this module is properly setup, but when I go to the source, I didn’t find any implementations of ZfcUser\Options\RegistrationOptionsInterface, but in the class ZfcUser\Form\Base, it called:
65. $this->getRegistrationOptions()->getUseRegistrationFormCaptcha();
class Base is extended from ProvideEventsForm, which is extended form Zend\Form\Form, none of these classes is related to RegistrationOptionsInterface, why can the code above be called like that way, using $this?
It may work like something like the relation between controller plugin and controller, while it seems not, so how does this work?
User,
The options instance is instantiated and passed into the form in ZfcUser -> Module.php Look at line 72 and then line 89. The classes for Options are in src/ZfcUser/Options
Im still learning ZF2 as well