<?php
/***************************************************************************
*
* ListEntryFactory.php
* -------------------
*
* begin : Friday, Sep 27, 2003
* copyright : (C) 2002 The Kabramps Team
* email : hide@address.com,
* hide@address.com
*
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details.
* (http://www.gnu.org/licenses/gpl.html)
*
***************************************************************************/
class ListEntryFactory {
function factory ($entry, $attributes, $xml, $form, $type, $tmpl, $count=0, $open=false)
{
include_once ("includes/listentries/ListEntry.php");
switch ($type)
{
case 'ou':
case 'dc':
include_once ('includes/listentries/TreeOU.php');
return new TreeOU ($entry, $attributes, $xml, $form, $tmpl, $count, $open);
break;
default:
include_once ('includes/listentries/Detail.php');
return new Detail ($entry, $attributes, $xml, $form, $tmpl);
break;
}
}
}
?>