File: EntryFactory.php

package info (click to toggle)
phpldapadmin 1.1.0.5-6%2Blenny2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,008 kB
  • ctags: 3,949
  • sloc: php: 17,735; xml: 1,532; sh: 388; makefile: 46
file content (24 lines) | stat: -rw-r--r-- 536 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/EntryFactory.php,v 1.2 2007/12/15 07:50:32 wurley Exp $

/**
 * @package phpLDAPadmin
 * @author Xavier Bruyet
 *
 * Allows to create new entries
 */
abstract class EntryFactory {
	public function newEntry($dn) {
		global $ldapserver;

		if ($dn && $ldapserver->dnExists($dn)) {
			return $this->newEditingEntry($dn);
		} else {
			return $this->newCreatingEntry($dn);
		}
	}

	abstract public function newEditingEntry($dn);
	abstract public function newCreatingEntry($dn);
}
?>