PHP
Integrating with PERSCOM using PHP.
PERSCOM offers an official first-party PHP SDK to assist developers with integrating with PERSCOM. To build you next integration, check it out on GitHub!
Visit GitHub
Checkout the official PERSCOM PHP SDK.
Installation
Install the SDK with composer using the following command.
Getting Started
The following is a brief overview of how the PHP SDK is structured on a functional level. Each of these examples can be applied to the vast array of PERSCOM resources available. The SDK is built on the PERSCOM API and is seeks to follow the same naming conventions as the API to reduce confusion.
Error Handling
The PERSCOM SDK throws exceptions when an API error occurs. You can catch these exceptions and handle them accordingly with a standard `try/catch` block. For a more elegant approach to error handling, consider using the [promise-based](#promise-support) approach.
Promise Support
The PERSCOM SDK can send asynchronous requests using a promise-based approach. This allows you to handle both successful and failed requests in a more fluent way.