/** * * Checks to make sure the IMAP extension is available. * * @return void * */ protected function _preConfig() { parent::_preConfig(); if (!extension_loaded('imap')) { throw $this->_exception('ERR_EXTENSION_NOT_LOADED', array('extension' => 'imap')); } }
/** * * Checks to make sure a GMP or BCMath extension is available. * * @return void * */ protected function _preConfig() { parent::_preConfig(); if (extension_loaded('gmp')) { $this->_ext = 'gmp'; } elseif (extension_loaded('bcmath')) { $this->_ext = 'bc'; } else { throw $this->_exception('ERR_EXTENSION_NOT_LOADED', array('extension' => '(bcmath || gmp)')); } }