Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12240

New API3 wrapper for Local/Remote

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      The class civicrm_api3 has some issues..

      It does too many things at once:

      • Local vs remote
      • Different behavior depending on internal values: lastResult, currentEntity, etc.
      • __get() and __call() have to distinguish different states.

      So... I made a new one
      https://github.com/donquixote/CiviRemotePHP

      • responsibilities split into different classes
      • separate classes for remote and local
      • completely standalone, to guarantee that it works on a random php project with no other CiviCRM components installed.
      • nice way to access values and attributes of the result.

      Something in this direction can go into core. Xavier says he likes it

      Up to discuss:

      • behavior in case of error: throw exceptions? dedicated exceptions?
      • namespaces and PSR-0 in CiviCRM core? Should we start a lib/CiviCRM/ folder for namespaced classes, next to CRM/ ? (to be discussed in another issue)

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              donquixote Andreas Hennings
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: