1: <?php
2: /**
3: * A connection to a LDAP master/slave setup.
4: *
5: * PHP version 5
6: *
7: * @category Kolab
8: * @package Kolab_Server
9: * @author Gunnar Wrobel <wrobel@pardus.de>
10: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11: * @link http://pear.horde.org/index.php?package=Kolab_Server
12: */
13:
14: /**
15: * A connection to a LDAP master/slave setup.
16: *
17: * Copyright 2008-2012 Horde LLC (http://www.horde.org/)
18: *
19: * See the enclosed file COPYING for license information (LGPL). If you
20: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
21: *
22: * @category Kolab
23: * @package Kolab_Server
24: * @author Gunnar Wrobel <wrobel@pardus.de>
25: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26: * @link http://pear.horde.org/index.php?package=Kolab_Server
27: */
28: class Horde_Kolab_Server_Connection_Splittedldap
29: implements Horde_Kolab_Server_Connection_Interface
30: {
31: /**
32: * LDAP read connection handle.
33: *
34: * @var Horde_Ldap
35: */
36: private $_ldap_read;
37:
38: /**
39: * LDAP write connection handle.
40: *
41: * @var Horde_Ldap
42: */
43: private $_ldap_write;
44:
45: /**
46: * Constructor
47: *
48: * @param Horde_Ldap $ldap_read The ldap_read connection.
49: * @param Horde_Ldap $ldap_write The ldap_write connection.
50: */
51: public function __construct(
52: Horde_Ldap $ldap_read,
53: Horde_Ldap $ldap_write
54: ) {
55: $this->_ldap_read = $ldap_read;
56: $this->_ldap_write = $ldap_write;
57: }
58:
59: /**
60: * Get the server read connection.
61: *
62: * @return mixed The connection for reading data.
63: */
64: public function getRead()
65: {
66: return $this->_ldap_read;
67: }
68:
69: /**
70: * Get the server write connection.
71: *
72: * @return mixed The connection for writing data.
73: */
74: public function getWrite()
75: {
76: return $this->_ldap_write;
77: }
78: }