@@ -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,7 +13,7 @@ discard block |
||
| 13 | 13 | // Set the api key in the Route4Me class |
| 14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 15 | 15 | |
| 16 | - $activityParameters=ActivityParameters::fromArray(array( |
|
| 16 | + $activityParameters = ActivityParameters::fromArray(array( |
|
| 17 | 17 | "activity_type" => "area-removed", |
| 18 | 18 | "limit" => 5, |
| 19 | 19 | "offset" => 0 |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | // "mark-destination-visited", "member-created", "member-deleted", "member-modified", "note-insert", "route-delete", "route-optimized", |
| 25 | 25 | // "route-owner-changed" |
| 26 | 26 | |
| 27 | - $activities=new ActivityParameters(); |
|
| 27 | + $activities = new ActivityParameters(); |
|
| 28 | 28 | |
| 29 | - $results=$activities->searcActivities($activityParameters); |
|
| 29 | + $results = $activities->searcActivities($activityParameters); |
|
| 30 | 30 | |
| 31 | 31 | foreach ($results as $key => $activity) { |
| 32 | 32 | Route4Me::simplePrint($activity); |
@@ -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,15 +11,15 @@ discard block |
||
| 11 | 11 | // Set the api key in the Route4Me class |
| 12 | 12 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 13 | 13 | |
| 14 | - $activityParameters=ActivityParameters::fromArray(array( |
|
| 14 | + $activityParameters = ActivityParameters::fromArray(array( |
|
| 15 | 15 | "limit" => 10, |
| 16 | 16 | "offset" => 0 |
| 17 | 17 | )); |
| 18 | 18 | |
| 19 | - $activities=new ActivityParameters(); |
|
| 20 | - $actresults=$activities->get($activityParameters); |
|
| 19 | + $activities = new ActivityParameters(); |
|
| 20 | + $actresults = $activities->get($activityParameters); |
|
| 21 | 21 | |
| 22 | - $results=$activities->getValue($actresults,"results"); |
|
| 22 | + $results = $activities->getValue($actresults, "results"); |
|
| 23 | 23 | |
| 24 | 24 | Route4Me::simplePrint($results); |
| 25 | 25 | |
@@ -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,16 +13,16 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | $routeId = '06B655F27E0D6A74BD37F6F9758E4D2E'; |
| 15 | 15 | |
| 16 | - $activityParameters=ActivityParameters::fromArray(array( |
|
| 16 | + $activityParameters = ActivityParameters::fromArray(array( |
|
| 17 | 17 | "route_id" => $routeId, |
| 18 | 18 | "team" => "true" |
| 19 | 19 | )); |
| 20 | 20 | |
| 21 | 21 | |
| 22 | - $activities=new ActivityParameters(); |
|
| 23 | - $actresults=$activities->get($activityParameters); |
|
| 22 | + $activities = new ActivityParameters(); |
|
| 23 | + $actresults = $activities->get($activityParameters); |
|
| 24 | 24 | |
| 25 | - $results=$activities->getValue($actresults,"results"); |
|
| 25 | + $results = $activities->getValue($actresults, "results"); |
|
| 26 | 26 | |
| 27 | 27 | Route4Me::simplePrint($results); |
| 28 | 28 | |
@@ -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 Avoidance Zone 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 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
| 23 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
| 22 | + $AvoisanceZoneParameters = AvoidanceZone::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 | - $avoidancezone=new AvoidanceZone(); |
|
| 28 | + $avoidancezone = new AvoidanceZone(); |
|
| 29 | 29 | |
| 30 | 30 | $result = (array)$avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
| 31 | 31 | |
| 32 | - $territory_id=""; |
|
| 32 | + $territory_id = ""; |
|
| 33 | 33 | if (isset($result)) { |
| 34 | 34 | $territory_id = $result["territory_id"]; |
| 35 | 35 | } else { |
@@ -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 Avoidance Zone with circle shape |
| 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 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
| 23 | - "territory_name" => "Test Circle Avoidance Zone ".strval(rand(10000,99999)), |
|
| 22 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
| 23 | + "territory_name" => "Test Circle Avoidance Zone ".strval(rand(10000, 99999)), |
|
| 24 | 24 | "territory_color" => "ff7700", |
| 25 | 25 | "territory" => $territory |
| 26 | 26 | )); |
| 27 | 27 | |
| 28 | - $avoidancezone=new AvoidanceZone(); |
|
| 28 | + $avoidancezone = new AvoidanceZone(); |
|
| 29 | 29 | |
| 30 | 30 | $result = $avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
| 31 | 31 | |
@@ -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 Avoidance Zone 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 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
| 23 | - "territory_name" => "Test Rectangular Avoidance Zone ".strval(rand(10000,99999)), |
|
| 22 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
| 23 | + "territory_name" => "Test Rectangular Avoidance Zone ".strval(rand(10000, 99999)), |
|
| 24 | 24 | "territory_color" => "ff7700", |
| 25 | 25 | "territory" => $territory |
| 26 | 26 | )); |
| 27 | 27 | |
| 28 | - $avoidancezone=new AvoidanceZone(); |
|
| 28 | + $avoidancezone = new AvoidanceZone(); |
|
| 29 | 29 | |
| 30 | 30 | $result = $avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
| 31 | 31 | |
@@ -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 Avoidance Zone with poligonian 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 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
| 30 | - "territory_name" => "Test Poligonian Avoidance Zone ".strval(rand(10000,99999)), |
|
| 29 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
| 30 | + "territory_name" => "Test Poligonian Avoidance Zone ".strval(rand(10000, 99999)), |
|
| 31 | 31 | "territory_color" => "ff7700", |
| 32 | 32 | "territory" => $territory |
| 33 | 33 | )); |
| 34 | 34 | |
| 35 | - $avoidancezone=new AvoidanceZone(); |
|
| 35 | + $avoidancezone = new AvoidanceZone(); |
|
| 36 | 36 | |
| 37 | 37 | $result = $avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
| 38 | 38 | |
@@ -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 | |
@@ -10,9 +10,9 @@ discard block |
||
| 10 | 10 | // Set the api key in the Route4Me class |
| 11 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 12 | 12 | |
| 13 | - $avoidancezone=new AvoidanceZone(); |
|
| 13 | + $avoidancezone = new AvoidanceZone(); |
|
| 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 | - $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 Avoidance Zone 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 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
| 23 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
| 22 | + $AvoisanceZoneParameters = AvoidanceZone::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 | - $avoidancezone=new AvoidanceZone(); |
|
| 28 | + $avoidancezone = new AvoidanceZone(); |
|
| 29 | 29 | |
| 30 | 30 | $result = (array)$avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
| 31 | 31 | |
| 32 | - $territory_id=""; |
|
| 32 | + $territory_id = ""; |
|
| 33 | 33 | if (isset($result)) { |
| 34 | 34 | $territory_id = $result["territory_id"]; |
| 35 | 35 | } else { |