PHPZip\Zip\Exception\HeaderPositionError::__construct PHP Method

__construct() public method

Constructor
Author: A. Grandt ([email protected])
Author: Greg Kappatos
public __construct ( array $config )
$config array 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);
    }