public function testContent() { $child1 = new Integer(123); $child2 = new PrintableString('Hello Wold'); $child3 = new Boolean(true); $object = new Sequence($child1, $child2, $child3); $this->assertEquals([$child1, $child2, $child3], $object->getContent()); }
/** * @param Sequence $sigSection * @return string * @throws \Exception */ public function parseSigAlg(Sequence $sigSection) { $sigInfo = $sigSection->getContent(); if (!$sigInfo[0] instanceof ObjectIdentifier) { throw new \Exception('Invaid sig: object identfier'); } return SigAlgorithmOidMapper::getAlgorithmFromOid($sigInfo[0]); }