/** * Local constructor * * @param string $publicKey * @param string $privateKey * @param string $email * @param array|\Zend\Config\Config $options */ public function __construct($publicKey = null, $privateKey = null, $email = null, $options = null) { /* Require the mcrypt extension to be loaded */ $this->_requireMcrypt(); /* If options is a Zend_Config object we want to convert it to an array so we can merge it with the default options */ if ($options instanceof \Zend\Config\Config) { $options = $options->toArray(); } /* Merge if needed */ if (is_array($options)) { $options = array_merge($this->getDefaultOptions(), $options); } else { $options = $this->getDefaultOptions(); } parent::__construct($publicKey, $privateKey, null, $options); if ($email !== null) { $this->setEmail($email); } }