abstract class AbstractEncoding implements Encoding {
abstract class AbstractEncoding implements Encoding {
/** @var string $string The string being decoded */
protected $string;
protected $string;
/** @var int $posByte The current byte position in the string */
protected $posByte = 0;
protected $posByte = 0;
/** @var int $posChar The current character (code point) position in the string */
protected $posChar = 0;
protected $posChar = 0;
/** @var int $lenByte The length of the string, in bytes */
protected $lenByte = null;
protected $lenByte = null;
/** @var int $lenChar The length of the string in characters, if known */
protected $lenChar = null;
protected $lenChar = null;
/** To be removed */
protected $dirtyEOF = 0;
protected $dirtyEOF = 0;
/** @var array $errStack A list of error data to aid in backwards seeking; the most recent error is kept off the stack */
protected $errStack = [];
/** @var int $errMark The byte position marking the most recent error. The one or more bytes previous to this position constitute an invalid character */
protected $errMark = -1;
/** @var int $errSync The byte position to which to move to skip over the most recent erroneous character */
protected $errSync = -2;
/** @var int $errMode The selected error mode (fatal or replace) */
protected $errMode = self::MODE_REPLACE;
protected $errMode = self::MODE_REPLACE;
/** @var bool $allowSurrogates Whether surrogates in encodings other than UTF-16 should be passed through */
protected $allowSurrogates = false;
protected $allowSurrogates = false;
/** @var bool $selfSynchronizing Whether the concrete class represents a self-synchronizing decoder. Such decoders do not use the error stack */
protected $selfSynchronizing = false;
protected $selfSynchronizing = false;
/** @var string[] $stateProps The list of properties which constitutee state which must be saved when peeking/seeking; some encodings may add to this last for their own purposes */