-
Notifications
You must be signed in to change notification settings - Fork 0
/
Record.php
44 lines (38 loc) · 1.08 KB
/
Record.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php declare(strict_types=1);
/**
* Copyright (C) Apis Networks, Inc - All Rights Reserved.
*
* Unauthorized copying of this file, via any medium, is
* strictly prohibited without consent. Any dissemination of
* material herein is prohibited.
*
* For licensing inquiries email <licensing@apisnetworks.com>
*
* Written by Matt Saladna <matt@apisnetworks.com>, March 2019
*/
namespace Opcenter\Dns\Providers\Linode;
class Record extends \Opcenter\Dns\Record
{
/**
* Override broken CAA formatting in Linode
*/
protected function formatCaa() {
if (0 !== ($pos = strspn($this['parameter'], '0123456789'))) {
$this['parameter'] = ltrim(substr($this['parameter'], $pos));
}
}
public function setMeta($key, $value = null): \Opcenter\Dns\Record
{
if ($this->rr === 'CAA' && $key === 'flags') {
$value = 0;
}
return parent::setMeta($key, $value); // TODO: Change the autogenerated stub
}
public function getMeta(string $key)
{
if ($this->rr === 'CAA' && $key === 'flags') {
return 0;
}
return parent::getMeta($key);
}
}