Conditions | 3 |
Paths | 6 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Davispeixoto\Laravel5Salesforce; |
||
44 | public function connect($configExternal) |
||
45 | { |
||
46 | $wsdl = $configExternal->get('salesforce.wsdl'); |
||
47 | |||
48 | if (empty($wsdl)) { |
||
49 | $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
||
50 | } |
||
51 | |||
52 | $user = $configExternal->get('salesforce.username'); |
||
53 | $pass = $configExternal->get('salesforce.password'); |
||
54 | $token = $configExternal->get('salesforce.token'); |
||
55 | |||
56 | try { |
||
57 | $this->sfh->createConnection($wsdl); |
||
58 | $this->sfh->login($user, $pass . $token); |
||
59 | } catch (Exception $e) { |
||
60 | throw new SalesforceException('Exception at Constructor' . $e->getMessage() . "\n\n" . $e->getTraceAsString()); |
||
61 | } |
||
62 | } |
||
63 | |||
72 |