Constructor.
public __construct ( array $params = [] ) | ||
$params | array | Configuration parameters: - email_charset: (string) The default email charset. |
/** * Constructor. * * @param array $params Configuration parameters: * - backends: (array) The explicit list of backend drivers * (Horde_Crypt_Pgp_Backend objects) to use. * - program: (string) The path to the GnuPG binary. * - temp: (string) Location of temporary directory. */ public function __construct($params = array()) { parent::__construct($params); }
/** * Constructor. * * @param array $params The following parameters: * <pre> * 'program' - (string) [REQUIRED] The path to the GnuPG binary. * 'proxy_host - (string) Proxy host. (@deprecated) * 'proxy_port - (integer) Proxy port. (@deprecated) * </pre> * * @throws InvalidArgumentException */ public function __construct($params = array()) { parent::__construct($params); if (empty($params['program'])) { throw new InvalidArgumentException('The location of the GnuPG binary must be given to the Horde_Crypt_Pgp:: class.'); } /* Store the location of GnuPG and set common options. */ $this->_gnupg = array($params['program'], '--no-tty', '--no-secmem-warning', '--no-options', '--no-default-keyring', '--yes', '--homedir ' . $this->_tempdir); if (strncasecmp(PHP_OS, 'WIN', 3)) { array_unshift($this->_gnupg, 'LANG= ;'); } $this->_params = $params; }