Download the PHP package ae/salesforce-rest-sdk without Composer

On this page you can find all versions of the php package ae/salesforce-rest-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package salesforce-rest-sdk

Salesforce Rest SDK

This API supports the following areas of the Salesforce API:

Installation

Instantiate a Rest Client

For more information about using client app names with Change Data Capture, see https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_event_fields_header.htm

If you have an authorization code returned to your redirectUrl and wish to use it, you can do so like this:

Cached Auth Providers

Cached Auth Providers provide a way to hold onto valid credentials across requests, otherwise the client will authenticate with Salesforce every time it's instantiated.

Composer autoloading without a framework

If you happen to not be using a PHP Framework that handles annotation registration for you, like Symfony, then you must do it yourself:

Work with SObjects with the SObject Client

Reference

For more information on Batch Sizes and the Sforce-Query-Options header, see https://developer.salesforce.com/docs/atlas.en-us.220.0.api_rest.meta/api_rest/headers_queryoptions.htm.

It should be noted that batch size may not be respected in Salesforce if it is not optimal for performance

Instantiate the Streaming Client

Reference

Subscribe to a PushTopic

You can create a new PushTopic using the Rest Client above. The topic only needs created once in a Salesforce Org. All custom objects are supported by the Streaming API, however, not all standard objects supported.

Supported Standard Objects:

Tasks that are created or updated using the following methods don’t appear in task object topics in the streaming API.

  • Lead conversion
  • Entity merge
  • Mass email contacts/leads

The $client->start(); is a blocking call and no code after it will execute until an error occurs in the client, causing it to disconnect.

For instance, the client must reconnect to the streaming server within 40 seconds after each notification is received. If it fails to do so, it will attempt to re-handshake to create a new connection. If that fails, then the client will disconnect, which will allow the rest of the script to execute.

It's recommended that the streaming client be run in it's own thread

Dispatching Generic Events

Create a Streaming Channel

Before you can dispatch a Generic Event, you must create a Streaming Channel. That can be done in a number of ways:

  1. Via the Salesforce Classic UI as documented here
  2. By enabling Enable Dynamic Streaming Channel Creation under Setup > User Interface and then subscribing to a Streaming Channel using the Streaming Client as documented above
  3. Streaming Channels are a regular ole SObject and can be created like one:

Send Generic Events to the Streaming Channel

Once the StreamingChannel is created, events can now be sent to it using the GenericEventClient, which piggybacks on the SObject client. Let's pretend we're continuing the code from above in this next example:

Future Additions


All versions of salesforce-rest-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
guzzlehttp/guzzle Version ^6.3
jms/serializer Version ^3.0
ramsey/uuid Version ^3.8
doctrine/collections Version ^1.5
symfony/cache Version ^4.0|^5.0
psr/log Version ^1.1
symfony/expression-language Version ^4.2|^5.0
jms/metadata Version ^1.0|^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ae/salesforce-rest-sdk contains the following files

Loading the files please wait ....