function buildItem($p_data) { $item = null; if ($p_data) { $item = new Item(); $item->buildFromArray($p_data); } return $item; }