Home

Mike Russell edited this page Aug 12, 2016 · 12 revisions

SugarCRM REST PHP Client

Architecture

There are four main components to the PHP REST Client

  • Client
    • The main object used to make calls to the API. It authenticates and manages authentication to the API throughout the usage of the Object lifespan.
  • Endpoint
    • A specific Endpoint of the API. Manages the Endpoint URL, Data, Request and Response.
  • Requests
    • An object for manipulating Curl, without having to dig into Curl itself.
  • Response
    • An object for manipulating the Curl Response, and providing a way to customize and process the data received in a meaningful way.

These four areas are designated by the folder structure in the src/ directory of the repository.

SugarAPI Client

The Sugar REST PHP Client lays out a framework for easily working with the Sugar 7 REST API. It also includes a default Client that can be quickly accessed to connect to a server. Review the SugarAPI Client documentation for usage of that Client to get your development started.

Contributing

As of right now, version 1.x is being maintained, and in order for the Sugar REST PHP Client to work well for all, version 1.x will not change in the overarching usage of architecture and the usage of the Sugar Client. That being said, if a Bug is found when using the Sugar REST PHP Client please submit an issue, and if you have a solution, submit a Pull Request for that issue. We will try to resolve Bugs as quickly as possible, and release a new version with those Bug fixes.

As far as adding functionality goes, if you would like other Endpoints that are not already included in the Sugar REST PHP Client, we would be more than happy to add those in for version 1.x. What we will not do with version 1.x, is alter the current usages of Endpoints (such as their dynamic function names), as we want to maintain backwards compatibility with any code that may be using the framework. You can submit an feature requests via the Github Issues page as well.

Lastly, if you see any documentation that is incorrect in the Wiki, please submit an issue. Unfortunately the Wiki is not open to public editing, however if you submit an issue, and you are proposing a change to the documentation, you can do the following:

  1. Pull the wiki down via Git
  2. Sync to your own fork
  3. Make your changes to the documentation
  4. Include a link to your Fork's updated Wiki page in the issue