@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -18,15 +18,15 @@ discard block |
||
18 | 18 | |
19 | 19 | $route = new Route(); |
20 | 20 | |
21 | -$routeResults = $route->getRoutes(null,$RouteParameters); |
|
21 | +$routeResults = $route->getRoutes(null, $RouteParameters); |
|
22 | 22 | |
23 | 23 | foreach ($routeResults as $routeResult) |
24 | 24 | { |
25 | 25 | $results = (array)$routeResult; |
26 | 26 | |
27 | - if (isset($results['route_id'])) echo "Route ID - > " . $results['route_id'] . "<br>"; |
|
27 | + if (isset($results['route_id'])) echo "Route ID - > ".$results['route_id']."<br>"; |
|
28 | 28 | |
29 | - if (isset($results['parameters']->route_name)) echo "Route name - > " . $results['parameters']->route_name . "<br>"; |
|
29 | + if (isset($results['parameters']->route_name)) echo "Route name - > ".$results['parameters']->route_name."<br>"; |
|
30 | 30 | |
31 | 31 | echo "<br>"; |
32 | 32 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | "limit" => 20 |
23 | 23 | ); |
24 | 24 | |
25 | -$routes = $route->getRoutes(null,$routesParams); |
|
25 | +$routes = $route->getRoutes(null, $routesParams); |
|
26 | 26 | |
27 | 27 | $selectedRoute = null; |
28 | 28 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // Set the api key in the Route4Me class |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | -$route=new Route(); |
|
16 | +$route = new Route(); |
|
17 | 17 | |
18 | 18 | // Get a random route ID |
19 | 19 | $route_id = $route->getRandomRouteId(0, 10); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | "member_id" => $randomRoute->member_id, |
34 | 34 | "optimize" => "Distance", |
35 | 35 | "route_max_duration" => "82400", |
36 | - "route_name" => "updated " . date('m-d-Y') |
|
36 | + "route_name" => "updated ".date('m-d-Y') |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | $route->httpheaders = 'Content-type: application/json'; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | "compress_path_points" => TRUE |
28 | 28 | ); |
29 | 29 | |
30 | -$routeResults = (array)$route->getRoutePoints($route_id,$params); |
|
30 | +$routeResults = (array)$route->getRoutePoints($route_id, $params); |
|
31 | 31 | |
32 | 32 | if (isset($routeResults['addresses'])) { |
33 | 33 | foreach ($routeResults['addresses'] as $key => $address) { |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // Set the api key in the Route4Me class |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | -$territory=new Territory(); |
|
16 | +$territory = new Territory(); |
|
17 | 17 | |
18 | 18 | // Select a terriotry with the addresses from the list |
19 | 19 | $params = array( |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | assert_options(ASSERT_ACTIVE, 1); |
11 | 11 | assert_options(ASSERT_BAIL, 1); |
12 | 12 | |
13 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
13 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
14 | 14 | require $root.'/vendor/autoload.php'; |
15 | 15 | |
16 | 16 | // Set the api key in the Route4Me class |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | // Create a territory and get territory_id |
20 | 20 | $territory = new Territory(); |
21 | 21 | $territory->type = TerritoryTypes::CIRCLE; |
22 | -$territory->data = array ( |
|
22 | +$territory->data = array( |
|
23 | 23 | "37.569752822786455,-77.47833251953125", |
24 | 24 | "5000" |
25 | 25 | ); |
26 | 26 | |
27 | 27 | $TerritoryParameters = Territory::fromArray(array( |
28 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
28 | + "territory_name" => "Test Territory ".strval(rand(10000, 99999)), |
|
29 | 29 | "territory_color" => "ff7700", |
30 | 30 | "territory" => $territory |
31 | 31 | )); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | $territory = new Territory(); |
14 | 14 | |
15 | -$queryparameters = array ( |
|
15 | +$queryparameters = array( |
|
16 | 16 | "offset" => 0, |
17 | 17 | "limit" => 20 |
18 | 18 | ); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root=realpath(dirname(__FILE__).'/../../'); |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | 5 | require $root.'/vendor/autoload.php'; |
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | ); |
21 | 21 | |
22 | 22 | $TerritoryParameters = Territory::fromArray(array( |
23 | - "territory_name" => "Test Rectangular Territory ".strval(rand(10000,99999)), |
|
23 | + "territory_name" => "Test Rectangular Territory ".strval(rand(10000, 99999)), |
|
24 | 24 | "territory_color" => "ff7700", |
25 | 25 | "territory" => $territory |
26 | 26 | )); |
27 | 27 | |
28 | -$territory=new Territory(); |
|
28 | +$territory = new Territory(); |
|
29 | 29 | |
30 | 30 | $result = $territory->addTerritory($TerritoryParameters); |
31 | 31 |