Download the PHP package php-arsenal/salesforce-mapper-bundle without Composer
On this page you can find all versions of the php package php-arsenal/salesforce-mapper-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-arsenal/salesforce-mapper-bundle
More information about php-arsenal/salesforce-mapper-bundle
Files in php-arsenal/salesforce-mapper-bundle
Package salesforce-mapper-bundle
Short Description Symfony bundle that maps raw Salesforce objects with your models.
License MIT
Homepage https://github.com/php-arsenal/salesforce-mapper-bundle
Informations about the package salesforce-mapper-bundle
Salesforce Mapper Bundle
Introduction
The Symfony bundle helps you fetch & map Salesforce objects effectivelly to your own modals to use later with Doctrine or stand-alone.
Installation
composer require php-arsenal/salesforce-mapper-bundle
Features
- Easily fetch records from Salesforce, and save these same records back to Salesforce: read-only fields are automatically ignored when saving.
- Find by criteria just like in Doctrine.
- Fetch related records in one go, so you save on API calls.
- Adjust the mappings to retrieve and save records exactly like you want to.
- The MappedBulkSaver helps you stay within your Salesforce API limits by using bulk creates, deletes, updates and upserts for mapped objects.
- Completely unit tested (still working on that one).
Usage
Once installed, the bundle offers several services that are autowired for dependancy injection:
- a mapper:
PhpArsenal\SalesforceMapperBundle\Mapper
- a bulk saver:
PhpArsenal\SalesforceMapperBundle\MappedBulkSaver
Fetch filtered records
Use the mapper to fetch records from Salesforce. An example:
You can even fetch related records just by going through related objects:
Fetch all records
Saving records
If you create a new record and save it, the ID assigned to it by Salesforce is
accessible with getId()
.
PhpArsenal\SalesforceMapperBundle\MappedBulkSaver
can be used to save mulitple objects in batches.
Custom objects and properties
In the Model
folder you will find several standard Salesforce objects. As this
is a generic client bundle, this directory does not contain custom objects, nor
do the objects in it have custom properties.
If you would like to add custom objects or properties, please extend from AbstractModel
or the models provided.
The mapper knows how to map fields reading the annotations above the property:
All versions of salesforce-mapper-bundle with dependencies
doctrine/cache Version ^1.11
doctrine/common Version ^3.1.0
doctrine/mongodb-odm-bundle Version ^4.3
friendsofphp/proxy-manager-lts Version ^1.0
php-arsenal/salesforce-bundle Version ^4.0
sensio/framework-extra-bundle Version ^6.1.0
symfony/dependency-injection Version ^5.2
symfony/event-dispatcher Version ^5.2
symfony/http-kernel Version ^5.2