PHP code example of maillotf / salesforce-bridge-bundle

1. Go to this page and download the library: Download maillotf/salesforce-bridge-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maillotf / salesforce-bridge-bundle example snippets



//...
use MaillotF\Salesforce\SalesforceBridgeBundle\Service\SalesforceService;

class exampleController extends AbstractController
{
	/**
	 * Example
	 * 
	 * @Route("example", name="example", methods={"GET"})
	 * 
	 */
	public function test(SalesforceService $SalesforceService)
	{
		//Update record
		$response = $SalesforceService->getBySobjectId('Contact', '0035J000001fqm1QAA');
		if ($response->isSuccess() === true)
			return ($this->json('OK'));
		return ($this->json('Not Found', Response::HTTP_BAD_REQUEST));
	}

}