Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Chris Bowlby (cbowlby@tenthpowertech.com)
Author: Max Kalika (max@horde.org)
Author: Jan Schneider (jan@horde.org)
Inheritance: extends Sam_Driver_Base
Example #1
0
 /**
  * Constructor.
  *
  * @param string $user   A user name.
  * @param array $params  Class parameters:
  *                       - vfs: (Horde_Vfs_Base) A VFS handle pointing to
  *                         the FTP server.
  *                       - user_prefs: (string) The file with the
  *                         user preferences, relative to the home directory.
  */
 public function __construct($user, $params = array())
 {
     foreach (array('vfs', 'user_prefs') as $param) {
         if (!isset($params[$param])) {
             throw new InvalidArgumentException(sprintf('"%s" parameter is missing', $param));
         }
     }
     $this->_vfs = $params['vfs'];
     unset($params['vfs']);
     parent::__construct($user, $params);
 }
Example #2
0
 /**
  * Constructor.
  *
  * @param string $user   A user name.
  * @param array $params  Class parameters:
  *                       - ldap: (Horde_Ldap) An LDAP handle pointing to
  *                         the directory server.
  *                       - uid: (string) The user ID attribute name.
  *                       - basedn: (string) The base DN.
  *                       - attribute: (string) The storage attribute.
  */
 public function __construct($user, $params = array())
 {
     foreach (array('ldap', 'uid', 'basedn', 'attribute', 'defaults') as $param) {
         if (!isset($params[$param])) {
             throw new InvalidArgumentException(sprintf('"%s" parameter is missing', $param));
         }
     }
     $this->_ldap = $params['ldap'];
     $this->_options = $params['defaults'];
     unset($params['ldap'], $params['defaults']);
     parent::__construct($user, $params);
 }
Example #3
0
 /**
  * Constructor.
  *
  * @param string $user   A user name.
  * @param array $params  Class parameters:
  *                       - db:    (Horde_Db_Adapater) A database handle.
  *                       - table: (string) The name of the preference table.
  *                       - global_user: (string, optional) A user name to
  *                         use when setting global preferences. Defaults to
  *                         '@GLOBAL'.
  */
 public function __construct($user, $params = array())
 {
     foreach (array('db', 'table') as $param) {
         if (!isset($params[$param])) {
             throw new InvalidArgumentException(sprintf('"%s" parameter is missing', $param));
         }
     }
     $this->_db = $params['db'];
     unset($params['db']);
     $params = array_merge(array('global_user' => '@GLOBAL'), $params);
     $this->_capabilities[] = 'global_defaults';
     parent::__construct($user, $params);
 }