我正在构建一个 GooglePlaces API,它被打包为一个 http 数据源。
我认为将它与基本Places
模型和基本gplaces
连接一起发布是个好主意,这样数据源就可以在我的应用程序中开箱即用地PlacesController
使用:
use app\models\Places;
use google\models\Places as GPlaces;
class PlacesController extends \lithium\action\Controller { ... }
但我希望能够以某种方式为插件默认连接附加gplaces
API 密钥。
试过:
GPlaces::config(array(
'key' => 'AIzaSyAQ802bwgTUw6KcBnaHF1YWdzW6zvIf4to'
));
但它不会影响(正如我们所料)的连接,
有任何想法吗 ?