I’m working on this library for a couple of projects, and it may be useful if you want to talk to SugarCRM from your PHP application:
The library contains access to all of SugarCRM’s REST API functions (V4, so far) and attempts to wrap the Sugar data up into a number of models (Entry, EntryList and Module so far). The idea is that your application should not care about the REST link, or the strange internal structure of data provided and required by Sugar – all that should be hidden, so you can just deal with simple data as easily as possible.
The library is still going through a lot of refactoring, as I learn more about the SugarCRM API, more about some PHP design patterns I’ve not coded before, and finding more use-cases in current projects. If you want to use it, let me know, and I’ll try to keep you informed of any major changes. In the meantime, I’m assuming I’m the only person using it, so files will move, methods will change, but the intention is that it will always work. You have been warned 🙂
Any suggestions or contributions you can make, will also be much appreciated. There are methods in there that I will never be using, so will not get around to writing wrappers for them.
The “REST” API for SugarCRM is a bit of a misnomer. You can use any verb in your API requests, as long as it is POST. You can access resources on any path, as long as it is the main entry point. That is the way the API is. If it changes, this library should isolate your application from those changes (hopefully, improvements).
Take a look and let me know what is missing for your own use-case. Tell me if I am going totally the wrong way with this thing, or completely bypassing current best practice or modern PHP techniques. I want this to be something we can all use, and make it easy to integrate SugarCRM with any custom PHP application.
Edit: and yes, documentation is way behind on this thing, especially PHPdoc headers. For now, I’m just getting the library working and throwing comments in where I can, to explain how it works and why it works like it does.