Change the syntax for zone->create method #146
robbinjanssen
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Excerpt from a test-case: $zone = new Zone($connector, 'test.nl');
$zone->create([
(new ResourceRecord())
->setZone($zone)
->setName('test')
->setType(RecordType::A)
->setRecord((new Record())
->setContent('127.0.0.1'))
->setTtl(10),
(new ResourceRecord())
->setZone($zone)
->setName('@')
->setType(RecordType::A)
->setRecord((new Record())->setContent('127.0.0.1'))
->setTtl(20),
(new ResourceRecord())
->setZone($zone)
->setName('@')
->setType(RecordType::MX)
->setRecords([
(new Record())->setContent('10 mail01.test.nl.'),
(new Record())->setContent('20 mail02.test.nl.'),
])
->setTtl(30),
(new ResourceRecord())
->setZone($zone)
->setName('test02')
->setType(RecordType::A)
->setRecord((new Record())->setContent('127.0.0.1'))
->setTtl(40),
(new ResourceRecord())
->setZone($zone)
->setName('test03')
->setType(RecordType::TXT)->setRecord(
(new Record())
->setContent('"v=DMARC1; p=none; rua=mailto:info@test.nl; ruf=mailto:info@test.nl"')
)
->setTtl(40),
]); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Originally posted by @bennetgallein in #144 (comment)
Beta Was this translation helpful? Give feedback.
All reactions