<?
require_once("classes/User.class.php");
require_once("classes/Cart.class.php");
require_once("header.php");
// We will use this
$persistence = new Persistence();
/* Lookup of the user by his id */
$user = $persistence->getById("User", 1);
// We create a Cart object, linked to the user.
$cart = new Cart();
$cart->user = $user;
$cart->date = time();
// let's save the cart.
$persistence->save($cart);
// Lets look at the cart
// Logger::debug prints a dump of the object
Logger::debug($cart);
?>