1<?php 2/* 3 * This file is part of the PHPASN1 library. 4 * 5 * Copyright © Friedrich Große <friedrich.grosse@gmail.com> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 11namespace FG\ASN1\Composite; 12 13use FG\ASN1\ASNObject; 14use FG\ASN1\Universal\Sequence; 15use FG\ASN1\Universal\ObjectIdentifier; 16 17class AttributeTypeAndValue extends Sequence 18{ 19 /** 20 * @param ObjectIdentifier|string $objIdentifier 21 * @param \FG\ASN1\ASNObject $value 22 */ 23 public function __construct($objIdentifier, ASNObject $value) 24 { 25 if ($objIdentifier instanceof ObjectIdentifier == false) { 26 $objIdentifier = new ObjectIdentifier($objIdentifier); 27 } 28 parent::__construct($objIdentifier, $value); 29 } 30 31 public function __toString() 32 { 33 return $this->children[0].': '.$this->children[1]; 34 } 35} 36