Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function init() |
||
29 | { |
||
30 | parent::init(); |
||
31 | |||
32 | if(\Yii::$container->has(\talismanfr\geocode\contracts\Geocode::class)){ |
||
33 | $this->geocode=\Yii::$container->get(\talismanfr\geocode\contracts\Geocode::class); |
||
34 | }else{ |
||
35 | $geocode=new Geocode(); |
||
36 | $geocode->apikey=$this->apikey; |
||
37 | $geocode->useProxy=$this->useProxy; |
||
38 | $geocode->proxyConf=$this->proxyConf; |
||
39 | $this->geocode=$geocode; |
||
40 | } |
||
41 | |||
42 | $this->collection=new GeocodeCollection($this->geocode); |
||
43 | } |
||
54 | } |