laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

apigility and config file #62

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

Hi, when create new api from the interface it was a nice think to create the invoke of the resource factory in this way:

public function __invoke($services) { return new MyResouceResource($services); }

and inside the resouce file a constructor like this:

public function __construct($services) { $config = $services->get('Config'); }

so we can manage the config keys and the database setting and adapter. Thanks


Originally posted by @radici at https://github.com/zfcampus/zf-apigility/issues/74