@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | |
15 | 15 | // Get random route from test routes |
16 | 16 | //-------------------------------------------------------- |
17 | - $route=new Route(); |
|
17 | + $route = new Route(); |
|
18 | 18 | |
19 | - $route_id=$route->getRandomRouteId(0, 10); |
|
19 | + $route_id = $route->getRandomRouteId(0, 10); |
|
20 | 20 | |
21 | 21 | if (is_null($route_id)) { |
22 | 22 | echo "can't retrieve random route_id!.. Try again."; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | // Get random address's id from selected route above |
28 | 28 | //-------------------------------------------------------- |
29 | - $addressRand=(array)$route->GetRandomAddressFromRoute($route_id); |
|
29 | + $addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
30 | 30 | |
31 | 31 | if (isset($addressRand['is_depot'])) |
32 | 32 | { |
@@ -45,18 +45,18 @@ discard block |
||
45 | 45 | } |
46 | 46 | //-------------------------------------------------------- |
47 | 47 | |
48 | - $addressParameters=(array)Address::fromArray(array( |
|
48 | + $addressParameters = (array)Address::fromArray(array( |
|
49 | 49 | "route_id" => $route_id, |
50 | 50 | "route_destination_id" => $address_id, |
51 | 51 | )); |
52 | 52 | |
53 | - $body= array( |
|
53 | + $body = array( |
|
54 | 54 | "is_visited" => TRUE, |
55 | 55 | ); |
56 | 56 | |
57 | - $address=new Address(); |
|
57 | + $address = new Address(); |
|
58 | 58 | |
59 | - $result=$address->markAddress($addressParameters, $body); |
|
59 | + $result = $address->markAddress($addressParameters, $body); |
|
60 | 60 | |
61 | 61 | Route4Me::simplePrint($result); |
62 | 62 | ?> |
63 | 63 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | |
15 | 15 | // Get random route from test routes |
16 | 16 | //-------------------------------------------------------- |
17 | - $route=new Route(); |
|
17 | + $route = new Route(); |
|
18 | 18 | |
19 | - $route_id=$route->getRandomRouteId(0, 10); |
|
19 | + $route_id = $route->getRandomRouteId(0, 10); |
|
20 | 20 | |
21 | 21 | if (is_null($route_id)) { |
22 | 22 | echo "can't retrieve random route_id!.. Try again."; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | // Get random address's id from selected route above |
28 | 28 | //-------------------------------------------------------- |
29 | - $addressRand=(array)$route->GetRandomAddressFromRoute($route_id); |
|
29 | + $addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
30 | 30 | |
31 | 31 | if (isset($addressRand['is_depot'])) |
32 | 32 | { |
@@ -45,18 +45,18 @@ discard block |
||
45 | 45 | } |
46 | 46 | //-------------------------------------------------------- |
47 | 47 | |
48 | - $addressParameters=(array)Address::fromArray(array( |
|
48 | + $addressParameters = (array)Address::fromArray(array( |
|
49 | 49 | "route_id" => $route_id, |
50 | 50 | "route_destination_id" => $address_id, |
51 | 51 | )); |
52 | 52 | |
53 | - $body= array( |
|
53 | + $body = array( |
|
54 | 54 | "is_departed" => TRUE, |
55 | 55 | ); |
56 | 56 | |
57 | - $address=new Address(); |
|
57 | + $address = new Address(); |
|
58 | 58 | |
59 | - $result=$address->markAddress($addressParameters, $body); |
|
59 | + $result = $address->markAddress($addressParameters, $body); |
|
60 | 60 | |
61 | 61 | Route4Me::simplePrint($result); |
62 | 62 | ?> |
63 | 63 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | |
14 | 14 | // Get random route from test routes |
15 | 15 | //-------------------------------------------------------- |
16 | - $route=new Route(); |
|
16 | + $route = new Route(); |
|
17 | 17 | |
18 | - $route_id=$route->getRandomRouteId(0, 10); |
|
18 | + $route_id = $route->getRandomRouteId(0, 10); |
|
19 | 19 | |
20 | 20 | if (is_null($route_id)) { |
21 | 21 | echo "can't retrieve random route_id!.. Try again."; |
@@ -23,16 +23,16 @@ discard block |
||
23 | 23 | } |
24 | 24 | //-------------------------------------------------------- |
25 | 25 | |
26 | - $addresses=array(); |
|
26 | + $addresses = array(); |
|
27 | 27 | |
28 | - $address1=(array)Address::fromArray(array( |
|
28 | + $address1 = (array)Address::fromArray(array( |
|
29 | 29 | 'address' => '146 Bill Johnson Rd NE Milledgeville GA 31061', |
30 | 30 | 'lat' => 33.143526, |
31 | 31 | 'lng' => -83.240354, |
32 | 32 | 'time' => 0 |
33 | 33 | )); |
34 | 34 | |
35 | - $address2=(array)Address::fromArray(array( |
|
35 | + $address2 = (array)Address::fromArray(array( |
|
36 | 36 | 'address' => '222 Blake Cir Milledgeville GA 31061', |
37 | 37 | 'lat' => 33.177852, |
38 | 38 | 'lng' => -83.263535, |
@@ -40,17 +40,17 @@ discard block |
||
40 | 40 | )); |
41 | 41 | |
42 | 42 | |
43 | - $addresses[]=$address1; |
|
44 | - $addresses[]=$address2; |
|
43 | + $addresses[] = $address1; |
|
44 | + $addresses[] = $address2; |
|
45 | 45 | |
46 | - $routeParameters=(array)Route::fromArray(array( |
|
46 | + $routeParameters = (array)Route::fromArray(array( |
|
47 | 47 | "route_id" => $route_id, |
48 | 48 | "addresses" => $addresses, |
49 | 49 | )); |
50 | 50 | |
51 | - $route1=new Route(); |
|
51 | + $route1 = new Route(); |
|
52 | 52 | |
53 | - $result=$route1->addAddresses($routeParameters); |
|
53 | + $result = $route1->addAddresses($routeParameters); |
|
54 | 54 | |
55 | 55 | Route4Me::simplePrint((array)$result); |
56 | 56 | ?> |
57 | 57 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | |
14 | 14 | // Get random source route from test routes |
15 | 15 | //-------------------------------------------------------- |
16 | - $route=new Route(); |
|
16 | + $route = new Route(); |
|
17 | 17 | |
18 | - $route_id0=$route->getRandomRouteId(0, 10); |
|
18 | + $route_id0 = $route->getRandomRouteId(0, 10); |
|
19 | 19 | |
20 | 20 | if (is_null($route_id0)) { |
21 | 21 | echo "can't retrieve random route_id!.. Try again."; |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | // Get random source destination from selected source route above |
27 | 27 | //-------------------------------------------------------- |
28 | - $addressRand=(array)$route->GetRandomAddressFromRoute($route_id0); |
|
29 | - $route_destination_id=$addressRand['route_destination_id']; |
|
28 | + $addressRand = (array)$route->GetRandomAddressFromRoute($route_id0); |
|
29 | + $route_destination_id = $addressRand['route_destination_id']; |
|
30 | 30 | |
31 | 31 | if (is_null($route_destination_id)) { |
32 | 32 | echo "can't retrieve random address!.. Try again."; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // Get random destination route from test routes |
39 | 39 | //-------------------------------------------------------- |
40 | - $to_route_id=$route->getRandomRouteId(11, 20); |
|
40 | + $to_route_id = $route->getRandomRouteId(11, 20); |
|
41 | 41 | |
42 | 42 | if (is_null($to_route_id)) { |
43 | 43 | echo "can't retrieve random route_id!.. Try again."; |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | // Get random destination destination from selected source route above |
50 | 50 | //-------------------------------------------------------- |
51 | - $addressRand2=(array)$route->GetRandomAddressFromRoute($to_route_id); |
|
52 | - $after_destination_id=$addressRand2['route_destination_id']; |
|
51 | + $addressRand2 = (array)$route->GetRandomAddressFromRoute($to_route_id); |
|
52 | + $after_destination_id = $addressRand2['route_destination_id']; |
|
53 | 53 | |
54 | 54 | if (is_null($after_destination_id)) { |
55 | 55 | echo "can't retrieve random address!.. Try again."; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | echo "after_destination_id = $after_destination_id <br>"; |
59 | 59 | //-------------------------------------------------------- |
60 | 60 | |
61 | - $routeparams=(array)Address::fromArray(array( |
|
61 | + $routeparams = (array)Address::fromArray(array( |
|
62 | 62 | 'address' => $addressRand['address'], |
63 | 63 | 'lat' => $addressRand['lat'], |
64 | 64 | 'lng' => $addressRand['lng'], |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'after_destination_id' => strval($after_destination_id) |
68 | 68 | )); |
69 | 69 | |
70 | - $address=new Address(); |
|
70 | + $address = new Address(); |
|
71 | 71 | $result = $address->MoveDestinationToRoute($routeparams); |
72 | 72 | //$result=$route->MoveDestinationToRoute($routeparams); |
73 | 73 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Address; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | // Set the api key in the Route4Me class |
12 | 12 | Route4Me::setApiKey('11111111111111111111111111111111'); |
13 | 13 | |
14 | - $address=new Address(); |
|
14 | + $address = new Address(); |
|
15 | 15 | |
16 | 16 | $params = array( |
17 | 17 | "route_id" => "5C15E83A4BE005BCD1537955D28D51D7", |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | "member_id" => 1 |
21 | 21 | ); |
22 | 22 | |
23 | - $result=$address->markAsVisited($params); |
|
23 | + $result = $address->markAsVisited($params); |
|
24 | 24 | |
25 | 25 | var_dump($result); |
26 | 26 | ?> |
27 | 27 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | |
15 | 15 | // Get random route from test routes |
16 | 16 | //-------------------------------------------------------- |
17 | - $route=new Route(); |
|
17 | + $route = new Route(); |
|
18 | 18 | |
19 | - $route_id=$route->getRandomRouteId(0, 10); |
|
19 | + $route_id = $route->getRandomRouteId(0, 10); |
|
20 | 20 | |
21 | 21 | if (is_null($route_id)) { |
22 | 22 | echo "can't retrieve random route_id!.. Try again."; |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | // Get random address's id from selected route above |
28 | 28 | //-------------------------------------------------------- |
29 | - $addressRand=(array)$route->GetRandomAddressFromRoute($route_id); |
|
30 | - $optimization_problem_id=$addressRand['optimization_problem_id']; |
|
29 | + $addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
30 | + $optimization_problem_id = $addressRand['optimization_problem_id']; |
|
31 | 31 | |
32 | 32 | if (is_null($optimization_problem_id)) { |
33 | 33 | echo "can't retrieve random address!.. Try again."; |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | } |
36 | 36 | //-------------------------------------------------------- |
37 | 37 | |
38 | - $addresses=array(); |
|
38 | + $addresses = array(); |
|
39 | 39 | |
40 | - $address1=(array)Address::fromArray(array( |
|
40 | + $address1 = (array)Address::fromArray(array( |
|
41 | 41 | 'address' => '717 5th Ave New York, NY 10021', |
42 | 42 | 'alias' => 'Giorgio Armani', |
43 | 43 | 'lat' => 40.7669692, |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | 'time' => 0 |
46 | 46 | )); |
47 | 47 | |
48 | - $addresses[0]=$address1; |
|
48 | + $addresses[0] = $address1; |
|
49 | 49 | |
50 | - $OptimizationParameters=(array)OptimizationProblem::fromArray(array( |
|
50 | + $OptimizationParameters = (array)OptimizationProblem::fromArray(array( |
|
51 | 51 | "optimization_problem_id" => $optimization_problem_id, |
52 | 52 | "addresses" => $addresses, |
53 | 53 | "reoptimize" => 1, |
54 | 54 | )); |
55 | 55 | |
56 | - $optimizationproblem=new OptimizationProblem(); |
|
56 | + $optimizationproblem = new OptimizationProblem(); |
|
57 | 57 | |
58 | - $result=$optimizationproblem->update($OptimizationParameters); |
|
58 | + $result = $optimizationproblem->update($OptimizationParameters); |
|
59 | 59 | |
60 | 60 | Route4Me::simplePrint($result); |
61 | 61 | ?> |
62 | 62 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -15,9 +15,9 @@ discard block |
||
15 | 15 | |
16 | 16 | // Get random route from test routes |
17 | 17 | //-------------------------------------------------------- |
18 | - $route=new Route(); |
|
18 | + $route = new Route(); |
|
19 | 19 | |
20 | - $route_id=$route->getRandomRouteId(0, 10); |
|
20 | + $route_id = $route->getRandomRouteId(0, 10); |
|
21 | 21 | |
22 | 22 | if (is_null($route_id)) { |
23 | 23 | echo "can't retrieve random route_id!.. Try again."; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | } |
26 | 26 | //-------------------------------------------------------- |
27 | 27 | |
28 | - $addresses=array(); |
|
28 | + $addresses = array(); |
|
29 | 29 | |
30 | - $params=array( |
|
30 | + $params = array( |
|
31 | 31 | "route_id" => "5C15E83A4BE005BCD1537955D28D51D7", |
32 | 32 | "addresses" => array( |
33 | 33 | "0" => array( |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | "optimal_position" => true |
45 | 45 | ); |
46 | 46 | |
47 | - $route1=new Route(); |
|
47 | + $route1 = new Route(); |
|
48 | 48 | |
49 | - $result=$route1->insertAddressOptimalPosition($params); |
|
49 | + $result = $route1->insertAddressOptimalPosition($params); |
|
50 | 50 | |
51 | 51 | Route4Me::simplePrint((array)$result); |
52 | 52 | ?> |
53 | 53 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Address; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | // Set the api key in the Route4Me class |
12 | 12 | Route4Me::setApiKey('11111111111111111111111111111111'); |
13 | 13 | |
14 | - $address=new Address(); |
|
14 | + $address = new Address(); |
|
15 | 15 | |
16 | 16 | $params = array( |
17 | 17 | "route_id" => "5C15E83A4BE005BCD1537955D28D51D7", |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | "member_id" => 1 |
21 | 21 | ); |
22 | 22 | |
23 | - $result=$address->markAsDeparted($params); |
|
23 | + $result = $address->markAsDeparted($params); |
|
24 | 24 | |
25 | 25 | var_dump($result); |
26 | 26 | ?> |
27 | 27 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | |
14 | 14 | // Get random route from test routes |
15 | 15 | //-------------------------------------------------------- |
16 | - $route=new Route(); |
|
16 | + $route = new Route(); |
|
17 | 17 | |
18 | - $route_id=$route->getRandomRouteId(0, 10); |
|
18 | + $route_id = $route->getRandomRouteId(0, 10); |
|
19 | 19 | |
20 | 20 | if (is_null($route_id)) { |
21 | 21 | echo "can't retrieve random route_id!.. Try again."; |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | // Get random address's id from selected route above |
27 | 27 | //-------------------------------------------------------- |
28 | - $addressRand=(array)$route->GetRandomAddressFromRoute($route_id); |
|
29 | - $route_destination_id=$addressRand['route_destination_id']; |
|
28 | + $addressRand = (array)$route->GetRandomAddressFromRoute($route_id); |
|
29 | + $route_destination_id = $addressRand['route_destination_id']; |
|
30 | 30 | |
31 | 31 | if (is_null($route_destination_id)) { |
32 | 32 | echo "can't retrieve random address!.. Try again."; |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | } |
35 | 35 | //-------------------------------------------------------- |
36 | 36 | |
37 | - $address=new Address(); |
|
37 | + $address = new Address(); |
|
38 | 38 | |
39 | - $addressRetrieved=$address->getAddress($route_id, $route_destination_id); |
|
39 | + $addressRetrieved = $address->getAddress($route_id, $route_destination_id); |
|
40 | 40 | |
41 | 41 | Route4Me::simplePrint((array)$addressRetrieved); |
42 | 42 | ?> |
43 | 43 | \ No newline at end of file |