Created
April 18, 2013 01:54
-
-
Save jedateach/5409341 to your computer and use it in GitHub Desktop.
Shop API planning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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