byrokrat / giroapp

Command line app for managing autogiro donations.
GNU General Public License v3.0
4 stars 2 forks source link

Let SettingsMapper create objects directly #101

Closed hanneskod closed 6 years ago

hanneskod commented 7 years ago

Using an interface like

public function getOrganizationName(): string;
public function getOrganizationId(): StateId;
public function getBankgiro(): Bankgiro;
public function getBgcCustomerNumber(): string;

Creates a single entry point for factories, and a great place for error checking and throwing informative exceptions...

hanneskod commented 6 years ago

Some doubts here. Why not let settings go in a simple giroapp.json settings file. Then create a wrapper with the factory stuff..

The drawback is that we may or may not have init.

The gain is a simpler interface for plugins to add specific settings, and for users to tweek plugins..

hanneskod commented 6 years ago

Related to #152

hanneskod commented 6 years ago

outdated..