@@ -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\Geocoding; |
@@ -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 | - $gcParameters=(array)Geocoding::fromArray(array( |
|
| 16 | + $gcParameters = (array)Geocoding::fromArray(array( |
|
| 17 | 17 | "zipcode" => '00601', |
| 18 | 18 | "housenumber" => 17 |
| 19 | 19 | )); |
@@ -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\Geocoding; |
@@ -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 | - $gcParameters=(array)Geocoding::fromArray(array( |
|
| 16 | + $gcParameters = (array)Geocoding::fromArray(array( |
|
| 17 | 17 | "pk" => 4 |
| 18 | 18 | )); |
| 19 | 19 | |
@@ -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 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 { |
@@ -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 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 | |
@@ -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 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 | |
@@ -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 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 | |
@@ -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 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 { |
@@ -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 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 { |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | //----------------------------------------------------------- |
| 43 | 43 | |
| 44 | 44 | $territory = new Territory(); |
| 45 | - $territory->type = TerritoryTypes::RECT; |
|
| 46 | - $territory->data = array ( |
|
| 45 | + $territory->type = TerritoryTypes::RECT; |
|
| 46 | + $territory->data = array( |
|
| 47 | 47 | "37.869752822786455,-77.49833251953125", |
| 48 | 48 | "5000" |
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
| 51 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
| 52 | 52 | "territory_id" => $territory_id, |
| 53 | 53 | "territory_name" => "Test Territory Updated", |
| 54 | 54 | "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\Member; |
@@ -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 | - $params = Member::fromArray(array ( |
|
| 16 | + $params = Member::fromArray(array( |
|
| 17 | 17 | "config_key"=> "My height" |
| 18 | 18 | )); |
| 19 | 19 | |