Open radici opened 9 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
This repository has been closed and moved to laminas-api-tools/api-tools; a new issue has been opened at https://github.com/laminas-api-tools/api-tools/issues/62.
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