Basically, I'm writing a stock control system for a school shop.
It only needs to be *very* basic. (I'm not really using an interface -- I'm just representing it this way).
Code: Select all
interface iStock
{
public function addItem($name, $price, $quantity=1, $description='');
public function removeItem($id);
public function increaseQuantity($id, $amount); //When more stock comes in
public function decreaseQuantity($id, $amount=1); //When a sale occurs
public function disableItem($id); //Disable it in the system so people can't buy it even if it's in stock
public function enableItem($id);
public function changePrice($id, $price);
}