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