File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Exonet \Powerdns \Transformers ;
4+
5+ class ApiRectifyTransformer extends Transformer
6+ {
7+ /**
8+ * {@inheritdoc}
9+ */
10+ public function transform ()
11+ {
12+ return (object ) [
13+ 'api_rectify ' => $ this ->data ['api_rectify ' ],
14+ ];
15+ }
16+ }
Original file line number Diff line number Diff line change 1111use Exonet \Powerdns \Transformers \RRSetTransformer ;
1212use Exonet \Powerdns \Transformers \SoaEditApiTransformer ;
1313use Exonet \Powerdns \Transformers \SoaEditTransformer ;
14+ use Exonet \Powerdns \Transformers \ApiRectifyTransformer ;
1415use Exonet \Powerdns \Transformers \Transformer ;
1516
1617class Zone extends AbstractZone
@@ -299,6 +300,41 @@ public function setSoaEditApi(string $value): bool
299300 return $ this ->put (new SoaEditApiTransformer (['soa_edit_api ' => $ value ]));
300301 }
301302
303+ /**
304+ * Enable api_rectify for this zone.
305+ *
306+ * @return bool True when enabled.
307+ */
308+ public function enableApiRectify (): bool
309+ {
310+ return $ this ->setApiRectify (true );
311+ }
312+
313+ /**
314+ * Disable api_rectify for this zone.
315+ *
316+ * @return bool True when disabled.
317+ */
318+ public function disableApiRectify (): bool
319+ {
320+ return $ this ->setApiRectify (false );
321+ }
322+
323+ /**
324+ * Enable or disable api_rectify for this zone.
325+ *
326+ * @param bool $state True to enable, false to disable.
327+ *
328+ * @return bool True when the request succeeded.
329+ */
330+ public function setApiRectify (bool $ state ): bool
331+ {
332+ return $ this ->put (new ApiRectifyTransformer (['api_rectify ' => $ state ]));
333+ }
334+
335+ /**
336+
337+
302338 /**
303339 * Set the kind of zone: Native, Master or Slave.
304340 *
You can’t perform that action at this time.
0 commit comments