@@ -14,13 +14,13 @@ |
||
14 | 14 | $this->_mySforceConnection->setQueryOptions($options); |
15 | 15 | $response = $this->_mySforceConnection->query($query); |
16 | 16 | |
17 | - !$done = false; |
|
18 | - echo "Size of records: ".$response ->size."\n"; |
|
17 | + ! $done = false; |
|
18 | + echo "Size of records: " . $response ->size . "\n"; |
|
19 | 19 | |
20 | 20 | if ($response->size > 0) { |
21 | - while (!$done) { |
|
21 | + while ( ! $done) { |
|
22 | 22 | foreach ($response->records as $record) { |
23 | - echo $record->NumberOfEmployees."\r\n"; |
|
23 | + echo $record->NumberOfEmployees . "\r\n"; |
|
24 | 24 | } |
25 | 25 | if ($response->done != true) { |
26 | 26 | echo "***** Get Next Chunk *****\n"; |
@@ -10,17 +10,17 @@ discard block |
||
10 | 10 | |
11 | 11 | protected function _run() |
12 | 12 | { |
13 | - $pv = new stdClass(); |
|
14 | - $pv->majorNumber = 2; |
|
15 | - $pv->minorNumber = 1; |
|
16 | - $pv->namespace = SforceEnterpriseClient::ENTERPRISE_NAMESPACE; |
|
17 | - $header = new PackageVersionHeader( |
|
18 | - array($pv) |
|
19 | - ); |
|
20 | - print_r($header); |
|
21 | - $this->_mySforceConnection->setPackageVersionHeader($header); |
|
13 | + $pv = new stdClass(); |
|
14 | + $pv->majorNumber = 2; |
|
15 | + $pv->minorNumber = 1; |
|
16 | + $pv->namespace = SforceEnterpriseClient::ENTERPRISE_NAMESPACE; |
|
17 | + $header = new PackageVersionHeader( |
|
18 | + array($pv) |
|
19 | + ); |
|
20 | + print_r($header); |
|
21 | + $this->_mySforceConnection->setPackageVersionHeader($header); |
|
22 | 22 | |
23 | - $sObject = new stdclass(); |
|
23 | + $sObject = new stdclass(); |
|
24 | 24 | $sObject->FirstName = 'Smith'; |
25 | 25 | $sObject->LastName = 'John'; |
26 | 26 | $sObject->Phone = '510-555-5555'; |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | print_r($createResponse); |
32 | 32 | |
33 | 33 | print "**** LastRequestHeaders:\r\n"; |
34 | - print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
35 | - print "**** LastRequest:\r\n"; |
|
36 | - print_r($this->_mySforceConnection->getLastRequest()); |
|
34 | + print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
35 | + print "**** LastRequest:\r\n"; |
|
36 | + print_r($this->_mySforceConnection->getLastRequest()); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | \ No newline at end of file |
@@ -13,13 +13,13 @@ |
||
13 | 13 | */ |
14 | 14 | protected function _run() |
15 | 15 | { |
16 | - // Get list of all objects of Contact type |
|
17 | - /* |
|
16 | + // Get list of all objects of Contact type |
|
17 | + /* |
|
18 | 18 | $query = 'SELECT Id, Name, FirstName, LastName, Email from Contact'; |
19 | 19 | print_r($this->_mySforceConnection->query($query)); |
20 | 20 | /**/ |
21 | 21 | |
22 | - $objectType = 'Contact'; |
|
22 | + $objectType = 'Contact'; |
|
23 | 23 | |
24 | 24 | $createFields = array ( |
25 | 25 | ); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | $objectType = 'Contact'; |
23 | 23 | |
24 | - $createFields = array ( |
|
24 | + $createFields = array( |
|
25 | 25 | ); |
26 | 26 | |
27 | 27 | $sObject = new stdClass(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $sObject->FirstName = 'Bill'; |
39 | 39 | $sObject->LastName = 'Clinton'; |
40 | 40 | |
41 | - $upsertResponse = $this->_mySforceConnection->upsert('Email', array ($sObject), $objectType); |
|
41 | + $upsertResponse = $this->_mySforceConnection->upsert('Email', array($sObject), $objectType); |
|
42 | 42 | echo "Upserting Contact (existing)\r\n"; |
43 | 43 | print_r($upsertResponse); |
44 | 44 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $sObject->Email = '[email protected]'; |
48 | 48 | |
49 | 49 | echo "Upserting Contact (new)\n"; |
50 | - $upsertResponse = $this->_mySforceConnection->upsert('Email', array ($sObject), $objectType); |
|
50 | + $upsertResponse = $this->_mySforceConnection->upsert('Email', array($sObject), $objectType); |
|
51 | 51 | print_r($upsertResponse); |
52 | 52 | } |
53 | 53 | } |
54 | 54 | \ No newline at end of file |
@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | |
11 | 11 | protected function _run() |
12 | 12 | { |
13 | - $header = new AllowFieldTruncationHeader(true); |
|
14 | - print_r($header); |
|
15 | - $this->_mySforceConnection->setAllowFieldTruncationHeader($header); |
|
13 | + $header = new AllowFieldTruncationHeader(true); |
|
14 | + print_r($header); |
|
15 | + $this->_mySforceConnection->setAllowFieldTruncationHeader($header); |
|
16 | 16 | |
17 | - $sObject = new stdclass(); |
|
17 | + $sObject = new stdclass(); |
|
18 | 18 | $sObject->FirstName = 'Smith'; |
19 | 19 | $sObject->LastName = 'John'; |
20 | 20 | $sObject->Phone = '510-555-55551111111111111111111111111111111111111111111111111111111111111111111'; |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | print "**** LastRequestHeaders:\r\n"; |
28 | - print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
29 | - print "**** LastRequest:\r\n"; |
|
30 | - print_r($this->_mySforceConnection->getLastRequest()); |
|
28 | + print_r($this->_mySforceConnection->getLastRequestHeaders()); |
|
29 | + print "**** LastRequest:\r\n"; |
|
30 | + print_r($this->_mySforceConnection->getLastRequest()); |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
30 | 30 | echo "**** Creating the following:\r\n"; |
31 | 31 | print_r($createResponse);*/ |
32 | 32 | |
33 | - $new_password=$this->_mySforceConnection->resetPassword('005t0000000uonmAAA'); |
|
33 | + $new_password = $this->_mySforceConnection->resetPassword('005t0000000uonmAAA'); |
|
34 | 34 | print_r($new_password); |
35 | 35 | } |
36 | 36 | } |
37 | 37 | \ No newline at end of file |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $singleEmail2->emailPriority = EMAIL_PRIORITY_LOW; |
26 | 26 | |
27 | 27 | echo "***** Send Emails *****\n"; |
28 | - $emailResponse = $this->_mySforceConnection->sendSingleEmail(array ($singleEmail1, $singleEmail2)); |
|
28 | + $emailResponse = $this->_mySforceConnection->sendSingleEmail(array($singleEmail1, $singleEmail2)); |
|
29 | 29 | |
30 | 30 | print_r($emailResponse); |
31 | 31 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | echo "***** Updating record *****\n"; |
23 | 23 | $sObject->Id = $id; |
24 | 24 | $sObject->Phone = '999-999-9999'; |
25 | - $updateResponse = $this->_mySforceConnection->update(array ($sObject), "Contact"); |
|
25 | + $updateResponse = $this->_mySforceConnection->update(array($sObject), "Contact"); |
|
26 | 26 | print_r($updateResponse); |
27 | 27 | |
28 | 28 | echo "***** Wait 60 seconds *****\n"; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $currentTime = mktime(); |
32 | 32 | // assume that update occured within the last 5 mins. |
33 | - $startTime = $currentTime-(60*10); |
|
33 | + $startTime = $currentTime - (60 * 10); |
|
34 | 34 | $endTime = $currentTime; |
35 | 35 | |
36 | 36 | echo "***** Get Updated Leads *****\n"; |
@@ -13,14 +13,14 @@ |
||
13 | 13 | |
14 | 14 | $this->_mySforceConnection->setQueryOptions($options); |
15 | 15 | $response = $this->_mySforceConnection->query($query); |
16 | - !$done = false; |
|
16 | + ! $done = false; |
|
17 | 17 | |
18 | - echo "Size of records: ".$response ->size."\n"; |
|
18 | + echo "Size of records: " . $response ->size . "\n"; |
|
19 | 19 | |
20 | 20 | if ($response->size > 0) { |
21 | - while (!$done) { |
|
21 | + while ( ! $done) { |
|
22 | 22 | foreach ($response->records as $record) { |
23 | - echo $record->NumberOfEmployees."\r\n"; |
|
23 | + echo $record->NumberOfEmployees . "\r\n"; |
|
24 | 24 | } |
25 | 25 | if ($response->done != true) { |
26 | 26 | echo "***** Get Next Chunk *****\n"; |
@@ -12,11 +12,11 @@ |
||
12 | 12 | $response = $this->_mySforceConnection->query($query); |
13 | 13 | $response = new QueryResult($response); |
14 | 14 | |
15 | - echo "\n***** ".$this->getTestName()." *****\n"; |
|
15 | + echo "\n***** " . $this->getTestName() . " *****\n"; |
|
16 | 16 | print_r($response); |
17 | 17 | |
18 | - echo "\n***** ".$this->getTestName()." response records: *****\n"; |
|
19 | - if (isset($response->records) && !empty($response->records)) { |
|
18 | + echo "\n***** " . $this->getTestName() . " response records: *****\n"; |
|
19 | + if (isset($response->records) && ! empty($response->records)) { |
|
20 | 20 | foreach ($response->records as $key=>$record) { |
21 | 21 | echo "\n***** $key *****\n"; |
22 | 22 | if (isset($record->fields)) { |