@@ -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 | - $orderParameters=Order::fromArray(array( |
|
14 | + $orderParameters = Order::fromArray(array( |
|
15 | 15 | "address_1" => "318 S 39th St, Louisville, KY 40212, USA", |
16 | 16 | "cached_lat" => 38.259326, |
17 | 17 | "cached_lng" => -85.814979, |
@@ -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 | |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | Route4Me::setApiKey('11111111111111111111111111111111'); |
13 | 13 | |
14 | 14 | #region // Add a location, scheduled daily with custom data. |
15 | - $AdressBookLocationParameters=AddressBookLocation::fromArray(array( |
|
15 | + $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
|
16 | 16 | "address_1" => "1604 PARKRIDGE PKWY, Louisville, KY, 40214", |
17 | 17 | "address_alias" => "1604 PARKRIDGE PKWY 40214", |
18 | 18 | "address_group" => "Scheduled daily", |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | "service_time" => 900 |
33 | 33 | )); |
34 | 34 | |
35 | - $abContacts1=new AddressBookLocation(); |
|
35 | + $abContacts1 = new AddressBookLocation(); |
|
36 | 36 | |
37 | - $abcResults1=$abContacts1->addAdressBookLocation($AdressBookLocationParameters); |
|
37 | + $abcResults1 = $abContacts1->addAdressBookLocation($AdressBookLocationParameters); |
|
38 | 38 | |
39 | 39 | echo "address_id = ".strval($abcResults1["address_id"])."<br>"; |
40 | 40 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | #endregion |
43 | 43 | |
44 | 44 | #region // Add a location, scheduled weekly. |
45 | - $AdressBookLocationParameters=AddressBookLocation::fromArray(array( |
|
45 | + $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
|
46 | 46 | "address_1" => "1407 MCCOY, Louisville, KY, 40215", |
47 | 47 | "address_alias" => "1407 MCCOY 40215", |
48 | 48 | "address_group" => "Scheduled weekly", |
@@ -60,15 +60,15 @@ discard block |
||
60 | 60 | "mode" => "weekly", |
61 | 61 | "weekly" => array( |
62 | 62 | "every" => 1, |
63 | - "weekdays" => array(1,2,3,4,5) |
|
63 | + "weekdays" => array(1, 2, 3, 4, 5) |
|
64 | 64 | ) |
65 | 65 | )), |
66 | 66 | "service_time" => 600 |
67 | 67 | )); |
68 | 68 | |
69 | - $abContacts2=new AddressBookLocation(); |
|
69 | + $abContacts2 = new AddressBookLocation(); |
|
70 | 70 | |
71 | - $abcResults2=$abContacts2->addAdressBookLocation($AdressBookLocationParameters); |
|
71 | + $abcResults2 = $abContacts2->addAdressBookLocation($AdressBookLocationParameters); |
|
72 | 72 | |
73 | 73 | echo "address_id = ".strval($abcResults2["address_id"])."<br>"; |
74 | 74 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | #endregion |
77 | 77 | |
78 | 78 | #region // Add a location, scheduled monthly (dates mode). |
79 | - $AdressBookLocationParameters=AddressBookLocation::fromArray(array( |
|
79 | + $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
|
80 | 80 | "address_1" => "4805 BELLEVUE AVE, Louisville, KY, 40215", |
81 | 81 | "address_2" => "4806 BELLEVUE AVE, Louisville, KY, 40215", |
82 | 82 | "address_alias" => "4805 BELLEVUE AVE 40215", |
@@ -99,16 +99,16 @@ discard block |
||
99 | 99 | "monthly" => array( |
100 | 100 | "every" => 1, |
101 | 101 | "mode" => "dates", |
102 | - "dates" => array(20,22,23,24,25) |
|
102 | + "dates" => array(20, 22, 23, 24, 25) |
|
103 | 103 | ) |
104 | 104 | )), |
105 | 105 | "service_time" => 750, |
106 | 106 | "color" => "red" |
107 | 107 | )); |
108 | 108 | |
109 | - $abContacts3=new AddressBookLocation(); |
|
109 | + $abContacts3 = new AddressBookLocation(); |
|
110 | 110 | |
111 | - $abcResults3=$abContacts3->addAdressBookLocation($AdressBookLocationParameters); |
|
111 | + $abcResults3 = $abContacts3->addAdressBookLocation($AdressBookLocationParameters); |
|
112 | 112 | |
113 | 113 | echo "address_id = ".strval($abcResults3["address_id"])."<br>"; |
114 | 114 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | #endregion |
118 | 118 | |
119 | 119 | #region // AAdd a location, scheduled monthly (nth mode). |
120 | - $AdressBookLocationParameters=AddressBookLocation::fromArray(array( |
|
120 | + $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
|
121 | 121 | "address_1" => "730 CECIL AVENUE, Louisville, KY, 40211", |
122 | 122 | "address_alias" => "730 CECIL AVENUE 40211", |
123 | 123 | "address_group" => "Scheduled monthly", |
@@ -150,9 +150,9 @@ discard block |
||
150 | 150 | "address_icon" => "emoji/emoji-bus" |
151 | 151 | )); |
152 | 152 | |
153 | - $abContacts4=new AddressBookLocation(); |
|
153 | + $abContacts4 = new AddressBookLocation(); |
|
154 | 154 | |
155 | - $abcResults4=$abContacts4->addAdressBookLocation($AdressBookLocationParameters); |
|
155 | + $abcResults4 = $abContacts4->addAdressBookLocation($AdressBookLocationParameters); |
|
156 | 156 | |
157 | 157 | echo "address_id = ".strval($abcResults4["address_id"])."<br>"; |
158 | 158 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | #endregion |
161 | 161 | |
162 | 162 | #region // Add a location with the daily scheduling and blacklist. |
163 | - $AdressBookLocationParameters=AddressBookLocation::fromArray(array( |
|
163 | + $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
|
164 | 164 | |
165 | 165 | "address_1" => "4629 HILLSIDE DRIVE, Louisville, KY, 40216", |
166 | 166 | "address_alias" => "4629 HILLSIDE DRIVE 40216", |
@@ -183,13 +183,13 @@ discard block |
||
183 | 183 | "mode" => "daily", |
184 | 184 | "daily" => array("every" => 1) |
185 | 185 | ), |
186 | - "schedule_blacklist" => array("2017-02-24","2017-02-25"), |
|
186 | + "schedule_blacklist" => array("2017-02-24", "2017-02-25"), |
|
187 | 187 | "service_time" => 300 |
188 | 188 | )); |
189 | 189 | |
190 | - $abContacts5=new AddressBookLocation(); |
|
190 | + $abContacts5 = new AddressBookLocation(); |
|
191 | 191 | |
192 | - $abcResults5=$abContacts5->addAdressBookLocation($AdressBookLocationParameters); |
|
192 | + $abcResults5 = $abContacts5->addAdressBookLocation($AdressBookLocationParameters); |
|
193 | 193 | |
194 | 194 | echo "address_id = ".strval($abcResults5["address_id"])."<br>"; |
195 | 195 |