Skip to content

Commit

Permalink
[1.0.6]Add PHP 5.3.x support for Module LBS.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnsaturn committed Aug 19, 2014
1 parent 663f82e commit 1844d54
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGE LOG
==========

## 1.0.6

* Add PHP 5.3.x support for Module LBS.

## 1.0.5

* Initial release for [Module LBS](https://github.com/yoozi/LBS).
Expand Down
6 changes: 3 additions & 3 deletions lib/Yoozi/LBS/Query/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ abstract class AbstractQuery implements QueryInterface {
*
* @var array
*/
protected $segments = [
protected $segments = array(
'endpoint' => 'http://api.map.baidu.com',
'name' => null,
'version' => 'v2',
'method' => null,
];
);

/**
* Array to be constructed as a querystring.
*
* @var array
*/
protected $query = [];
protected $query = array();

/**
* Fill the query string array or segments.
Expand Down
4 changes: 2 additions & 2 deletions lib/Yoozi/LBS/Query/Geocoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class Geocoding extends AbstractQuery {
*
* @var array
*/
protected $segments = [
protected $segments = array(
'endpoint' => 'http://api.map.baidu.com',
'name' => 'geocoder',
'version' => 'v2',
'method' => null,
];
);
}
4 changes: 2 additions & 2 deletions lib/Yoozi/LBS/Query/IP2Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class IP2Location extends AbstractQuery {
*
* @var array
*/
protected $segments = [
protected $segments = array(
'endpoint' => 'http://api.map.baidu.com',
'name' => 'location',
'version' => null,
'method' => 'ip',
];
);
}
4 changes: 2 additions & 2 deletions lib/Yoozi/LBS/Query/Place.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class Place extends AbstractQuery {
*
* @var array
*/
protected $segments = [
protected $segments = array(
'endpoint' => 'http://api.map.baidu.com',
'name' => 'place',
'version' => 'v2',
// 可能存在 suggestion/search/detail/eventsearch/eventdetail 五个选项
// @see http://developer.baidu.com/map/webservice-placeapi.htm
// @see http://developer.baidu.com/map/wiki/index.php?title=webapi/place-suggestion-api
'method' => 'search'
];
);

}
4 changes: 2 additions & 2 deletions tests/LBS/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public function testBasicMethods()
$query->set('method', 'test');
$this->assertEquals($query->get('method'), 'test');

$segments = [
$segments = array(
'endpoint' => 'http://api.map.baidu.com',
'name' => 'location',
'version' => null,
'method' => 'ip'
];
);

$query->fill($segments, 'segments');
$this->assertEquals($query->get('method'), $segments['method']);
Expand Down

0 comments on commit 1844d54

Please sign in to comment.