Location: PHPKode > projects > LDAPted > ldapted/includes/listentries/ListEntry.php
<?php
/***************************************************************************
 *
 *                                  ListEntry.php
 *                              -------------------
 *
 *   begin                : Friday, Jul 5, 2002
 *   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 ListEntry {
  
  var $entry;
  var $form;
  var $attributes;
  var $control;
  var $tmpl        = object;

	function ListEntry($entry, $attributes, $xml, $form, $tmpl)
	{

		$this->entry      = $entry;
		$this->attributes = $attributes;
		$this->form       = $form;
		$this->tmpl       = $tmpl;
    
		$controlFactory = new ControlFactory;
		foreach($attributes as $attribute)
		{
			$this->control[$attribute] = $controlFactory->factory( $xml->get_type( $attribute ) );
			$this->control[$attribute]->init( $entry['dn'], $attribute, $xml, null );
			$this->control[$attribute]->set_value( $entry[$attribute] );
		}
	}

  function get_view () {
    die("get_view was not redeclared by the child");
  }

  function get_edit () {
    return $this->get_view();
  }

  function get_dn () {
    return $this->entry["dn"];
  }
}
?>
Return current item: LDAPted