'How can i surcharge a connection configuration from a controller in Lithium?
I'm building a GooglePlaces API, it is package as an http datasource.
I thought it would be a good idea to ship it with a basic Places model & a basic gplaces connection so that the datasource could be used out of the box in my app PlacesController using :
use app\models\Places;
use google\models\Places as GPlaces;
class PlacesController extends \lithium\action\Controller { ... }
But i'd like to be able to somehow surcharge the plugin default connection gplaces with so API key.
Tried :
GPlaces::config(array(
'key' => '<private_api_key>'
));
But it does not affect (as we could expect) the Connection,
Any ideas ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
