@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | 5 | require $root.'/vendor/autoload.php'; |
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
@@ -26,10 +26,10 @@ |
||
| 26 | 26 | |
| 27 | 27 | $results = $activities->sendUserMessage($postParameters); |
| 28 | 28 | |
| 29 | -$msg = isset($results["status"]) != null |
|
| 29 | +$msg = isset($results["status"])!=null |
|
| 30 | 30 | ? ($results["status"]==1 ? "The user message was sent to the route " : "he user message could not sent to the route ") |
| 31 | 31 | : "The user message could not sent to the route "; |
| 32 | 32 | |
| 33 | -$msg.=" with route_id=".$route_id; |
|
| 33 | +$msg .= " with route_id=".$route_id; |
|
| 34 | 34 | |
| 35 | 35 | echo "<br> $msg <br>"; |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | 5 | require $root.'/vendor/autoload.php'; |
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $activities = new ActivityParameters(); |
| 28 | 28 | $actresults = $activities->getActivities($activityParameters); |
| 29 | -$results = $activities->getValue($actresults,"results"); |
|
| 29 | +$results = $activities->getValue($actresults, "results"); |
|
| 30 | 30 | |
| 31 | 31 | foreach ($results as $result) { |
| 32 | 32 | Route4Me::simplePrint($result); |
@@ -13,13 +13,13 @@ |
||
| 13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 14 | 14 | |
| 15 | 15 | $recordParameters = Member::fromArray(array( |
| 16 | - 'email_address' => '[email protected]', |
|
| 17 | - 'first_name' => 'Mmmmm', |
|
| 18 | - 'last_name' => 'Ccccc', |
|
| 19 | - 'phone_number' => '454-454544', |
|
| 20 | - 'company_name' => 'c_name', |
|
| 21 | - 'member_id' => '123456', |
|
| 22 | - 'webinar_date' => '2016-06-05 10:00:00' |
|
| 16 | + 'email_address' => '[email protected]', |
|
| 17 | + 'first_name' => 'Mmmmm', |
|
| 18 | + 'last_name' => 'Ccccc', |
|
| 19 | + 'phone_number' => '454-454544', |
|
| 20 | + 'company_name' => 'c_name', |
|
| 21 | + 'member_id' => '123456', |
|
| 22 | + 'webinar_date' => '2016-06-05 10:00:00' |
|
| 23 | 23 | )); |
| 24 | 24 | |
| 25 | 25 | $member = new Member(); |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Route4Me; |
| 3 | 3 | |
| 4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
| 4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
| 5 | 5 | require $root.'/vendor/autoload.php'; |
| 6 | 6 | |
| 7 | 7 | use Route4Me\Route4Me; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | "mode" => "weekly", |
| 62 | 62 | "weekly" => array( |
| 63 | 63 | "every" => 1, |
| 64 | - "weekdays" => array(1,2,3,4,5) |
|
| 64 | + "weekdays" => array(1, 2, 3, 4, 5) |
|
| 65 | 65 | ) |
| 66 | 66 | )), |
| 67 | 67 | "service_time" => 600 |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | "monthly" => array( |
| 102 | 102 | "every" => 1, |
| 103 | 103 | "mode" => "dates", |
| 104 | - "dates" => array(20,22,23,24,25) |
|
| 104 | + "dates" => array(20, 22, 23, 24, 25) |
|
| 105 | 105 | ) |
| 106 | 106 | )), |
| 107 | 107 | "service_time" => 750, |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | "mode" => "daily", |
| 187 | 187 | "daily" => array("every" => 1) |
| 188 | 188 | ), |
| 189 | - "schedule_blacklist" => array("2017-02-24","2017-02-25"), |
|
| 189 | + "schedule_blacklist" => array("2017-02-24", "2017-02-25"), |
|
| 190 | 190 | "service_time" => 300 |
| 191 | 191 | )); |
| 192 | 192 | |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 12 | 12 | |
| 13 | 13 | $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
| 14 | - "first_name" => "Test FirstName ".strval(rand(10000,99999)), |
|
| 15 | - "address_1" => "Test Address1 ".strval(rand(10000,99999)), |
|
| 14 | + "first_name" => "Test FirstName ".strval(rand(10000, 99999)), |
|
| 15 | + "address_1" => "Test Address1 ".strval(rand(10000, 99999)), |
|
| 16 | 16 | "cached_lat" => 38.024654, |
| 17 | 17 | "cached_lng" => -77.338814 |
| 18 | 18 | )); |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
| 14 | 14 | |
| 15 | 15 | $AdressBookLocationParameters = AddressBookLocation::fromArray(array( |
| 16 | - "first_name" => "Test FirstName ".strval(rand(10000,99999)), |
|
| 17 | - "address_1" => "Test Address1 ".strval(rand(10000,99999)), |
|
| 16 | + "first_name" => "Test FirstName ".strval(rand(10000, 99999)), |
|
| 17 | + "address_1" => "Test Address1 ".strval(rand(10000, 99999)), |
|
| 18 | 18 | "cached_lat" => 38.024654, |
| 19 | 19 | "cached_lng" => -77.338814 |
| 20 | 20 | )); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $address_id = $abcResult["address_id"]; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -assert($address_id != -1, "Cannot create an address book location. <br><br>"); |
|
| 34 | +assert($address_id!=-1, "Cannot create an address book location. <br><br>"); |
|
| 35 | 35 | |
| 36 | 36 | echo "Address Book Location with <b>address_id = ".strval($address_id)."</b> and <b>first_name = ".$abcResult['first_name']."</b> was successfully added<br>"; |
| 37 | 37 | |
@@ -41,6 +41,6 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | assert(isset($abcResult['first_name']), "Cannot update the address book location. <br><br>"); |
| 43 | 43 | |
| 44 | -assert($abcResult['first_name'] == 'Test Firstname Updated', "Cannot update the address book location. <br><br>"); |
|
| 44 | +assert($abcResult['first_name']=='Test Firstname Updated', "Cannot update the address book location. <br><br>"); |
|
| 45 | 45 | |
| 46 | 46 | echo "The field <b>first_name</b> in the address book location <b>".$address_id."</b> was update to <b>Test Firstname Updated</b> successfuly <br>"; |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | // Get reandom address book location |
| 15 | 15 | $AdressBookLocationParameters = array( |
| 16 | - "limit" => 30, |
|
| 17 | - "offset" => 0 |
|
| 18 | - ); |
|
| 16 | + "limit" => 30, |
|
| 17 | + "offset" => 0 |
|
| 18 | + ); |
|
| 19 | 19 | |
| 20 | 20 | $randomLocation = $abLocation->getRandomAddressBookLocation($AdressBookLocationParameters); |
| 21 | 21 | |
@@ -17,10 +17,10 @@ |
||
| 17 | 17 | // Example refers to the process of searching for text and specifing returned fields. |
| 18 | 18 | |
| 19 | 19 | $params = array( |
| 20 | - 'query' => 'David', |
|
| 21 | - 'fields' => 'first_name,address_email', |
|
| 22 | - 'offset' => 0, |
|
| 23 | - 'limit' => 5 |
|
| 20 | + 'query' => 'David', |
|
| 21 | + 'fields' => 'first_name,address_email', |
|
| 22 | + 'offset' => 0, |
|
| 23 | + 'limit' => 5 |
|
| 24 | 24 | ); |
| 25 | 25 | |
| 26 | 26 | $abcResult = $ablocation->searchAddressBookLocations($params); |