Skip to content

Instantly share code, notes, and snippets.

@jedateach
Created April 18, 2013 01:54
Show Gist options
  • Save jedateach/5409341 to your computer and use it in GitHub Desktop.
Save jedateach/5409341 to your computer and use it in GitHub Desktop.
Shop API planning
<?php
class Address_handler{
static $allowed_actions = array('GET','POST');
function GET($request){
}
function POST($request){
//check if cart exists
//
}
}
class Cart_handler{
static $allowed_actions = array('GET','POST');
function GET($request){
//find our make cart
}
}
class Product_handler {
static $allowed_actions = array('GET');
function GET($request){
}
}
class ProductList_handler {
static $allowed_actions = array("GET");
function GET($request){
//get all, or subset of products
//paginate if necessary
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment