Giter VIP home page Giter VIP logo

cartapi-engine-php's Introduction

Cart Plugins - Cart API Engine for PHP

Cart API encoding and decoding engine for PHP. Used by cart plugins implementing the Cart API protocol. If you are developing a new cart plugin in a PHP-based environment, use the PHP classes provided here to encode and decode the various Cart API protocol entities.

Classes

  • CartAPI_Engine - The general engine class, use this class when handling a Cart API request. Contains utility functions that handle a new request, parse the request metadata and initialize the correct encoder/decoder classes according to the metadata. For handling a new Cart API request, all you have to do is use the function CartAPI_Engine::handleRequest() which parses all the relevant arguments and initializes the correct encoder.
  • CartAPI_Helpers - Class containing various static helper utility functions. For example, use CartAPI_Helpers::createSuccessResponse() to create a successful response to the Cart API request, or use CartAPI_Helpers::dieOnError() to create a failure response and exit.

Mediums

Cart API supports various mediums for encoding/decoding protocol calls. For example, XML over HTTP POST and JSON over HTTP GET are two different mediums. For more information about mediums see Cart API mediums reference.

  • XML - Implementation of encoder/decoder for the XML over HTTP POST medium.
  • JSON - Implementation of encoder/decoder for the the JSONP over HTTP GET medium.

Internal Classes

  • CartAPI_Mediums_Encoder - Base class for an encoder. All encoders (for the various supported mediums) inherit from it. Should not be used directly.

cartapi-engine-php's People

Contributors

appixia avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.