/**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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->_written = (string) $config['written'];
     $message = sprintf('%s %s %s %s', 'Length Mismatch Error: Expected', $this->_expected, 'bytes, wrote', $this->_written);
     parent::__construct($message);
 }
 /**
  * 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 Greg Kappatos
  *
  * @param array $config Configuration array containing php.ini settings: setting and expected (value)
  */
 public function __construct(array $config)
 {
     $this->_setting = $config['setting'];
     $this->_expected = $config['expected'];
     $this->_actual = (string) @ini_get($this->_setting);
     $message = sprintf('%s %s "%s" %s %s %s', 'Invalid PHP Configuration: ', $this->_setting, $this->_actual, 'Please change this setting to', $this->_expected, 'to continue.');
     parent::__construct($message);
 }
Exemplo n.º 5
0
 /**
  * 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);
 }
Exemplo n.º 6
0
 /**
  * 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);
 }