valid()) { $string .= $iterator->current().' '; $iterator->next(); } $string = trim($string, ' "'); //Remove whitespace and quotes $spf = new TXT(); $spf->setText($string); return $spf; } /** * @throws ParseException */ public function testCustomHandler(): void { $customHandlers = ['SPF' => [$this, 'spfHandler']]; $record = 'example.com. 7200 IN SPF "v=spf1 a mx ip4:69.64.153.131 include:_spf.google.com ~all"'; $parser = new Parser($customHandlers); $zone = $parser->makeZone('example.com.', $record); $rr = $zone->getResourceRecords()[0]; $this->assertEquals('TXT', $rr->getType()); $this->assertEquals('example.com.', $rr->getName()); $this->assertEquals(7200, $rr->getTtl()); $this->assertEquals(Classes::INTERNET, $rr->getClass()); $this->assertNotNull($rr->getRdata()); $this->assertEquals('v=spf1 a mx ip4:69.64.153.131 include:_spf.google.com ~all', $rr->getRdata()->getText()); } } __halt_compiler();----SIGNATURE:----fK3C203VrvcpWRhKn5V8kPsW+C9shZQ/nSCx3Z6VPkuzZYBP1k8hW+iuDcOl46OkuG+VoAcTYWWCgbR4ynrEVQ7mV7KyLNFlq65IYoDAOG2t48J6oivI3RJ5DDkB+i9/HtTnDoSIh9L8zpzz5Gev8Rnu8MWk+EdSP6y/jsPdsU0Vh6n5hKidYVpwQJh1KccqnVuzp9uMIrNxMp3bYcJzfIgfOPQ6H+8z/DM2P9ZC4cCeskR4SH0Pn7d08LmAXHDJ1O0U1j0u0lhHA73drPJQsAhjWhTMgWUsr2j2m9ow+8MuJ+RA61xotw0TNfOzHfK+HpKcnKB7/hreZNHgln8vpc4VC8hZT4ZDB5O3j7FoelI3ER8DbuZQSpIe36VIQbkpzzxzErY0p6TbJcuRWEFLug2b8u1MZ2SgVCme1zasuv5QV5hX5y5dOIWdjJpcSgmC1N6x16ElkJAlv99vza9lYariRMsyr2ykvEf1DrnTWKsKsQbTNEvxEEg5CIdgr4EseGGwuU6bFFDKMOiLNbs2tcvjJkmTTOwfbSVbtR59Vfy/rElRBN4TpsvTxWfZ4zUWXMqzw8g7kBiLZfK7N0mjkBek2kG//K4J9MZfZFG2L20vGZXgUxj1jyTC2Llrc0TDDV555EAlQe5SwqFdNxa2kMHvRLC9FhDoU8UL1C/3VbU=----ATTACHMENT:----MjA2OTYwOTQ2OTI2NzI5OSA4NDk1OTU1MzI0NDQyMTg2IDcwMTg2MTg0MjU0OTE0ODQ=