Create FormFactory or not?
- materix
- Backer | 83
I apologize for this noob question.
I often see that people use FormFactory for creating forms.
For example:
class FormFactory
{
use Nette\SmartObject;
public function create(): Form
{
return new Form();
}
}
What is the advantage of this approach, in comparison with just calling
new Form()
directly?