Lines Matching refs:class

78 class BerEncoder implements EncoderInterface
235 # The first byte of a tag always contains the class (bits 8 and 7) and whether it is constructed (bit 6).
252 * Map universal types to specific tag class values when decoding.
254 * @param int $class
258 public function setTagMap(int $class, array $map)
260 if (isset($this->tagMap[$class])) {
261 $this->tagMap[$class] = $map;
323 * @param null|int $class
328 protected function decodeBytes(bool $isRoot = false, $tagType = null, $length = null, $isConstructed = null, $class = null): AbstractType
333 $class = $tag & 0xc0;
360 $tagType = ($class === AbstractType::TAG_CLASS_UNIVERSAL) ? $tagNumber : ($this->tmpTagMap[$class][$tagNumber] ?? null);
376 $type = new IncompleteType(substr($this->binary, $this->pos, $length), $tagNumber, $class, $isConstructed);
390 $type = EncodedType\BooleanType::withTag($tagNumber, $class, $this->decodeBoolean());
396 $type = EncodedType\NullType::withTag($tagNumber, $class);
402 $type = EncodedType\IntegerType::withTag($tagNumber, $class, $this->decodeInteger($length));
408 $type = EncodedType\EnumeratedType::withTag($tagNumber, $class, $this->decodeInteger($length));
414 $type = RealType::withTag($tagNumber, $class, $this->decodeReal($length));
417 $type = EncodedType\BitStringType::withTag($tagNumber, $class, $isConstructed, $this->decodeBitString($length));
423 $type = OidType::withTag($tagNumber, $class, $this->decodeOid($length));
429 $type = RelativeOidType::withTag($tagNumber, $class, $this->decodeRelativeOid($length));
432 $type = EncodedType\GeneralizedTimeType::withTag($tagNumber, $class, $isConstructed, ...$this->decodeGeneralizedTime($length));
435 $type = EncodedType\UtcTimeType::withTag($tagNumber, $class, $isConstructed, ...$this->decodeUtcTime($length));
438 $type = EncodedType\OctetStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
442 $type = EncodedType\GeneralStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
446 $type = EncodedType\VisibleStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
450 $type = EncodedType\BmpStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
454 $type = EncodedType\CharacterStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
458 $type = EncodedType\UniversalStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
462 $type = EncodedType\GraphicStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
466 $type = EncodedType\VideotexStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
470 $type = EncodedType\TeletexStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
474 $type = EncodedType\PrintableStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
478 $type = EncodedType\NumericStringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
482 $type = EncodedType\IA5StringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
486 $type = EncodedType\Utf8StringType::withTag($tagNumber, $class, $isConstructed, substr($this->binary, $this->pos, $length));
493 $type = EncodedType\SequenceType::withTag($tagNumber, $class, $this->decodeConstructedType($length));
499 $type = EncodedType\SetType::withTag($tagNumber, $class, $this->decodeConstructedType($length));