/** * Constructor * * @author A. Grandt <*****@*****.**> * @author Greg Kappatos * * @param array $config Configuration array containing appName, appVersion and minVersion (PHP) */ public function __construct(array $config) { $this->_minVersion = (string) $config['minVersion']; $this->_currentVersion = (string) phpversion(); $message = sprintf('%s %s %s %s %s (%s %s).', $config['appName'], (string) $config['appVersion'], 'requires PHP version', $this->_minVersion, 'or above', $this->_currentVersion, 'detected'); parent::__construct($message); }
/** * Constructor * * @author A. Grandt <*****@*****.**> * @author Greg Kappatos * * @param array $config Configuration array containing expected and written */ public function __construct(array $config) { $this->_expected = (string) $config['expected']; $this->_actual = (string) $config['actual']; $message = sprintf('%s %s %s %s %s', (string) ($this->_actual - $this->_expected), ' extra bytes before header. Expected pos ', $this->_expected, ' but found the header at ', $this->_actual); parent::__construct($message); }
/** * Constructor * * @author A. Grandt <*****@*****.**> * @author Greg Kappatos * * @param array $config Configuration array containing outputBuffer and fileName */ public function __construct(array $config) { $this->_outputBuffer = $config['outputBuffer']; $this->_fileName = isset($config['fileName']) ? $config['fileName'] : null; $message = is_null($this->_fileName) ? '' : "Unable to send '{$this->_fileName}'. "; $message .= "Output buffer contains the following text (typically warning or errors):\n{$this->_outputBuffer}"; parent::__construct($message); }
/** * Constructor * * @author A. Grandt <*****@*****.**> * @author Greg Kappatos * * @param array $config Configuration array containing headerFile, headerLine and fileName */ public function __construct(array $config) { $this->_headerFile = $config['headerFile']; $this->_headerLine = $config['headerLine']; $this->_fileName = isset($config['fileName']) ? $config['fileName'] : null; $message = is_null($this->_fileName) ? '' : "Unable to send '{$this->_fileName}'. "; $message .= "Headers have already been sent from '{$this->_headerFile}' in line {$this->_headerLine}"; parent::__construct($message); }