@@ -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\Vehicle; |
@@ -1,7 +1,7 @@ |
||
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 |
@@ -17,8 +17,8 @@ |
||
17 | 17 | ); |
18 | 18 | |
19 | 19 | $url = $url . '?' . http_build_query(array_merge( |
20 | - array( 'api_key' => '11111111111111111111111111111111'), $query |
|
21 | - )); |
|
20 | + array( 'api_key' => '11111111111111111111111111111111'), $query |
|
21 | + )); |
|
22 | 22 | ?> |
23 | 23 | |
24 | 24 | <form action="<?php echo $url ?>" method="post" encript="text/csv"> |
@@ -2,12 +2,12 @@ discard block |
||
2 | 2 | <html> |
3 | 3 | <body> |
4 | 4 | <?php |
5 | -$url="https://www.route4me.com/actions/addRouteNotes.php"; |
|
5 | +$url = "https://www.route4me.com/actions/addRouteNotes.php"; |
|
6 | 6 | |
7 | -$route_id="5C15E83A4BE005BCD1537955D28D51D7"; |
|
8 | -$address_id=162916895; |
|
7 | +$route_id = "5C15E83A4BE005BCD1537955D28D51D7"; |
|
8 | +$address_id = 162916895; |
|
9 | 9 | |
10 | -$query=array( |
|
10 | +$query = array( |
|
11 | 11 | "route_id" => $route_id, |
12 | 12 | "address_id" => $address_id, |
13 | 13 | "dev_lat" => 33.132675170898, |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | "strUpdateType" => "ANY_FILE" |
17 | 17 | ); |
18 | 18 | |
19 | -$url = $url . '?' . http_build_query(array_merge( |
|
20 | - array( 'api_key' => '11111111111111111111111111111111'), $query |
|
19 | +$url = $url.'?'.http_build_query(array_merge( |
|
20 | + array('api_key' => '11111111111111111111111111111111'), $query |
|
21 | 21 | )); |
22 | 22 | ?> |
23 | 23 |
@@ -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 | |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | } |
35 | 35 | //-------------------------------------------------------- |
36 | 36 | */ |
37 | - $route_id="6EC2759FD551516356AB2C9B335CAC16"; |
|
38 | - $route_destination_id="152555738"; |
|
37 | + $route_id = "6EC2759FD551516356AB2C9B335CAC16"; |
|
38 | + $route_destination_id = "152555738"; |
|
39 | 39 | |
40 | - $noteParameters=array( |
|
40 | + $noteParameters = array( |
|
41 | 41 | "route_id" => $route_id, |
42 | 42 | "address_id" => $route_destination_id, |
43 | 43 | "dev_lat" => 33.132675170898, |
@@ -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,24 +25,24 @@ 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."; |
33 | 33 | return; |
34 | 34 | } |
35 | 35 | //-------------------------------------------------------- |
36 | - $route_id='6EC2759FD551516356AB2C9B335CAC16'; |
|
37 | - $route_destination_id='152555738'; |
|
38 | - $noteParameters=array( |
|
36 | + $route_id = '6EC2759FD551516356AB2C9B335CAC16'; |
|
37 | + $route_destination_id = '152555738'; |
|
38 | + $noteParameters = array( |
|
39 | 39 | "route_id" => $route_id, |
40 | 40 | "route_destination_id" => $route_destination_id |
41 | 41 | ); |
42 | 42 | |
43 | - $address=new Address(); |
|
43 | + $address = new Address(); |
|
44 | 44 | |
45 | - $notes=$address->GetAddressesNotes($noteParameters); |
|
45 | + $notes = $address->GetAddressesNotes($noteParameters); |
|
46 | 46 | |
47 | 47 | echo "destination_note_count --> ".$notes['destination_note_count']."<br>"; |
48 | 48 | foreach ($notes['notes'] as $note) { |
@@ -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\Enum\TerritoryTypes; |
@@ -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,23 +14,23 @@ discard block |
||
14 | 14 | // Territory and get territory_id |
15 | 15 | //--------------------------------------------------------- |
16 | 16 | $territory = new Territory(); |
17 | - $territory->type = TerritoryTypes::CIRCLE; |
|
18 | - $territory->data = array ( |
|
17 | + $territory->type = TerritoryTypes::CIRCLE; |
|
18 | + $territory->data = array( |
|
19 | 19 | "37.569752822786455,-77.47833251953125", |
20 | 20 | "5000" |
21 | 21 | ); |
22 | 22 | |
23 | - $TerritoryParameters=Territory::fromArray(array( |
|
24 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
23 | + $TerritoryParameters = Territory::fromArray(array( |
|
24 | + "territory_name" => "Test Territory ".strval(rand(10000, 99999)), |
|
25 | 25 | "territory_color" => "ff7700", |
26 | 26 | "territory" => $territory |
27 | 27 | )); |
28 | 28 | |
29 | - $territory=new Territory(); |
|
29 | + $territory = new Territory(); |
|
30 | 30 | |
31 | 31 | $result = (array)$territory->addTerritory($TerritoryParameters); |
32 | 32 | |
33 | - $territory_id=""; |
|
33 | + $territory_id = ""; |
|
34 | 34 | if (isset($result)) { |
35 | 35 | $territory_id = $result["territory_id"]; |
36 | 36 | } else { |
@@ -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\Enum\TerritoryTypes; |
@@ -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,23 +13,23 @@ discard block |
||
13 | 13 | // Add Territory and get territory_id |
14 | 14 | //--------------------------------------------------------- |
15 | 15 | $territory = new Territory(); |
16 | - $territory->type = TerritoryTypes::CIRCLE; |
|
17 | - $territory->data = array ( |
|
16 | + $territory->type = TerritoryTypes::CIRCLE; |
|
17 | + $territory->data = array( |
|
18 | 18 | "37.569752822786455,-77.47833251953125", |
19 | 19 | "5000" |
20 | 20 | ); |
21 | 21 | |
22 | - $TerritoryParameters=Territory::fromArray(array( |
|
23 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
22 | + $TerritoryParameters = Territory::fromArray(array( |
|
23 | + "territory_name" => "Test 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 = (array)$territory->addTerritory($TerritoryParameters); |
31 | 31 | |
32 | - $territory_id=""; |
|
32 | + $territory_id = ""; |
|
33 | 33 | if (isset($result)) { |
34 | 34 | $territory_id = $result["territory_id"]; |
35 | 35 | } else { |
@@ -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\Enum\TerritoryTypes; |
@@ -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,19 +13,19 @@ discard block |
||
13 | 13 | // Example refers to the process of creating Territory with rectangular shape |
14 | 14 | |
15 | 15 | $territory = new Territory(); |
16 | - $territory->type = TerritoryTypes::RECT; |
|
17 | - $territory->data = array ( |
|
16 | + $territory->type = TerritoryTypes::RECT; |
|
17 | + $territory->data = array( |
|
18 | 18 | "43.51668853502909,-109.3798828125", |
19 | 19 | "46.98025235521883,-101.865234375" |
20 | 20 | ); |
21 | 21 | |
22 | - $TerritoryParameters=Territory::fromArray(array( |
|
23 | - "territory_name" => "Test Rectangular Territory ".strval(rand(10000,99999)), |
|
22 | + $TerritoryParameters = Territory::fromArray(array( |
|
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 |
@@ -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\Enum\TerritoryTypes; |
@@ -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,23 +14,23 @@ discard block |
||
14 | 14 | // Add Avoidance Zone and get territory_id |
15 | 15 | //--------------------------------------------------------- |
16 | 16 | $territory = new Territory(); |
17 | - $territory->type = TerritoryTypes::CIRCLE; |
|
18 | - $territory->data = array ( |
|
17 | + $territory->type = TerritoryTypes::CIRCLE; |
|
18 | + $territory->data = array( |
|
19 | 19 | "37.569752822786455,-77.47833251953125", |
20 | 20 | "5000" |
21 | 21 | ); |
22 | 22 | |
23 | - $TerritoryParameters=Territory::fromArray(array( |
|
24 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
23 | + $TerritoryParameters = Territory::fromArray(array( |
|
24 | + "territory_name" => "Test Territory ".strval(rand(10000, 99999)), |
|
25 | 25 | "territory_color" => "ff7700", |
26 | 26 | "territory" => $territory |
27 | 27 | )); |
28 | 28 | |
29 | - $territory=new Territory(); |
|
29 | + $territory = new Territory(); |
|
30 | 30 | |
31 | 31 | $result = (array)$territory->addTerritory($TerritoryParameters); |
32 | 32 | |
33 | - $territory_id=""; |
|
33 | + $territory_id = ""; |
|
34 | 34 | if (isset($result)) { |
35 | 35 | $territory_id = $result["territory_id"]; |
36 | 36 | } else { |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | //----------------------------------------------------------- |
44 | 44 | |
45 | 45 | $territory = new Territory(); |
46 | - $territory->type = TerritoryTypes::RECT; |
|
47 | - $territory->data = array ( |
|
46 | + $territory->type = TerritoryTypes::RECT; |
|
47 | + $territory->data = array( |
|
48 | 48 | "37.869752822786455,-77.49833251953125", |
49 | 49 | "5000" |
50 | 50 | ); |
51 | 51 | |
52 | - $TerritoryParameters=Territory::fromArray(array( |
|
52 | + $TerritoryParameters = Territory::fromArray(array( |
|
53 | 53 | "territory_id" => $territory_id, |
54 | 54 | "territory_name" => "Test Territory Updated", |
55 | 55 | "territory_color" => "ff5500", |
@@ -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\Enum\TerritoryTypes; |
@@ -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,8 +13,8 @@ discard block |
||
13 | 13 | // Example refers to the process of creating Territory with polygonian shape |
14 | 14 | |
15 | 15 | $territory = new Territory(); |
16 | - $territory->type = TerritoryTypes::POLY; |
|
17 | - $territory->data = array ( |
|
16 | + $territory->type = TerritoryTypes::POLY; |
|
17 | + $territory->data = array( |
|
18 | 18 | "37.769752822786455,-77.67833251953125", |
19 | 19 | "37.75886716305343,-77.68974800109863", |
20 | 20 | "37.74763966054455,-77.6917221069336", |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | "37.76641925847049,-77.66846199035645" |
27 | 27 | ); |
28 | 28 | |
29 | - $TerritoryParameters=Territory::fromArray(array( |
|
30 | - "territory_name" => "Test Polygonian Territory ".strval(rand(10000,99999)), |
|
29 | + $TerritoryParameters = Territory::fromArray(array( |
|
30 | + "territory_name" => "Test Polygonian Territory ".strval(rand(10000, 99999)), |
|
31 | 31 | "territory_color" => "ff7700", |
32 | 32 | "territory" => $territory |
33 | 33 | )); |
34 | 34 | |
35 | - $territory=new Territory(); |
|
35 | + $territory = new Territory(); |
|
36 | 36 | |
37 | 37 | $result = $territory->addTerritory($TerritoryParameters); |
38 | 38 |