<?php

require_once("classes/Wine.class.php");
require_once(
"header.php");

    
/**
    * getById gets an object as found with the given primary Key.
    * 
    * If no object is found, null is returned.
    * If multiple objects are found (what should not occur if the param is a real primary key),
    * only the first object is returned.
    * 
    * If a third, optional, "$isComplete" param is set to false, only the main object is
    * returned, not the agregated or linked subobjects.
    * In this case the members variables holding the subobjects are set to the subobjects identifier.
    * Inheritence is always used.
    *
    */  

  // Lets get the wine.
    
$persistence = new Persistence();
    
$wine $persistence->getById("Wine"1);

    
// done!
    // Logger::debug prints a dump of the object
    
Logger::debug($wine);
    
?>