asSequence())); } /** * Initialize from distinguished name string. */ public static function fromDNString(string $str): self { return self::create(Name::fromString($str)); } public function string(): string { return $this->directoryName->toString(); } /** * Get directory name. */ public function dn(): Name { return $this->directoryName; } protected function choiceASN1(): TaggedType { // Name type is itself a CHOICE, so explicit tagging must be // employed to avoid ambiguities return ExplicitlyTaggedType::create($this->tag, $this->directoryName->toASN1()); } }