@@ -14,69 +14,69 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | class Salesforce |
| 16 | 16 | { |
| 17 | - /** |
|
| 18 | - * @var Client $sfh The Salesforce Handler |
|
| 19 | - */ |
|
| 20 | - public $sfh; |
|
| 17 | + /** |
|
| 18 | + * @var Client $sfh The Salesforce Handler |
|
| 19 | + */ |
|
| 20 | + public $sfh; |
|
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * Salesforce constructor. |
|
| 24 | - * |
|
| 25 | - * @param Client $sfh |
|
| 26 | - * @throws SalesforceException |
|
| 27 | - */ |
|
| 28 | - public function __construct(Client $sfh) |
|
| 29 | - { |
|
| 30 | - $this->sfh = $sfh; |
|
| 31 | - } |
|
| 22 | + /** |
|
| 23 | + * Salesforce constructor. |
|
| 24 | + * |
|
| 25 | + * @param Client $sfh |
|
| 26 | + * @throws SalesforceException |
|
| 27 | + */ |
|
| 28 | + public function __construct(Client $sfh) |
|
| 29 | + { |
|
| 30 | + $this->sfh = $sfh; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @param $method |
|
| 35 | - * @param $args |
|
| 36 | - * @return mixed |
|
| 37 | - */ |
|
| 38 | - public function __call($method, $args) |
|
| 39 | - { |
|
| 40 | - return call_user_func_array(array($this->sfh, $method), $args); |
|
| 41 | - } |
|
| 33 | + /** |
|
| 34 | + * @param $method |
|
| 35 | + * @param $args |
|
| 36 | + * @return mixed |
|
| 37 | + */ |
|
| 38 | + public function __call($method, $args) |
|
| 39 | + { |
|
| 40 | + return call_user_func_array(array($this->sfh, $method), $args); |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Authenticates into Salesforce according to |
|
| 45 | - * the provided credentials and WSDL file |
|
| 46 | - * |
|
| 47 | - * @param $configExternal |
|
| 48 | - * @throws SalesforceException |
|
| 49 | - */ |
|
| 43 | + /** |
|
| 44 | + * Authenticates into Salesforce according to |
|
| 45 | + * the provided credentials and WSDL file |
|
| 46 | + * |
|
| 47 | + * @param $configExternal |
|
| 48 | + * @throws SalesforceException |
|
| 49 | + */ |
|
| 50 | 50 | |
| 51 | - public function connect($configExternal) |
|
| 52 | - { |
|
| 53 | - $wsdl = $configExternal->get('laravel-salesforce::wsdl'); |
|
| 51 | + public function connect($configExternal) |
|
| 52 | + { |
|
| 53 | + $wsdl = $configExternal->get('laravel-salesforce::wsdl'); |
|
| 54 | 54 | |
| 55 | - if (empty($wsdl)) { |
|
| 56 | - $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
|
| 57 | - } |
|
| 55 | + if (empty($wsdl)) { |
|
| 56 | + $wsdl = __DIR__ . '/Wsdl/enterprise.wsdl.xml'; |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - $username = $configExternal->get('laravel-salesforce::username'); |
|
| 60 | - $password = $configExternal->get('laravel-salesforce::password'); |
|
| 61 | - $token = $configExternal->get('laravel-salesforce::token'); |
|
| 59 | + $username = $configExternal->get('laravel-salesforce::username'); |
|
| 60 | + $password = $configExternal->get('laravel-salesforce::password'); |
|
| 61 | + $token = $configExternal->get('laravel-salesforce::token'); |
|
| 62 | 62 | |
| 63 | - try { |
|
| 64 | - $this->sfh->createConnection($wsdl); |
|
| 65 | - $this->sfh->login($username, $password . $token); |
|
| 66 | - } catch (Exception $e) { |
|
| 67 | - throw new SalesforceException('Exception at Constructor' . $e->getMessage() . "\n\n" . $e->getTraceAsString()); |
|
| 68 | - } |
|
| 69 | - } |
|
| 63 | + try { |
|
| 64 | + $this->sfh->createConnection($wsdl); |
|
| 65 | + $this->sfh->login($username, $password . $token); |
|
| 66 | + } catch (Exception $e) { |
|
| 67 | + throw new SalesforceException('Exception at Constructor' . $e->getMessage() . "\n\n" . $e->getTraceAsString()); |
|
| 68 | + } |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - /* |
|
| 71 | + /* |
|
| 72 | 72 | * Debugging functions |
| 73 | 73 | */ |
| 74 | 74 | |
| 75 | - /** |
|
| 76 | - * @return mixed |
|
| 77 | - */ |
|
| 78 | - public function dump() |
|
| 79 | - { |
|
| 80 | - return print_r($this, true); |
|
| 81 | - } |
|
| 75 | + /** |
|
| 76 | + * @return mixed |
|
| 77 | + */ |
|
| 78 | + public function dump() |
|
| 79 | + { |
|
| 80 | + return print_r($this, true); |
|
| 81 | + } |
|
| 82 | 82 | } |