@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: joerg |
|
5 | - * Date: 14.02.16 |
|
6 | - * Time: 20:31 |
|
7 | - * copied and modified from https://github.com/inwx/php-client |
|
8 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: joerg |
|
5 | + * Date: 14.02.16 |
|
6 | + * Time: 20:31 |
|
7 | + * copied and modified from https://github.com/inwx/php-client |
|
8 | + */ |
|
9 | 9 | namespace Bingemer\InwxBundle\Classes; |
10 | 10 | |
11 | 11 | class Domrobot |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | private $clTRID = null; |
18 | 18 | |
19 | 19 | private $_ver = "2.4"; |
20 | - private $_cachedir; |
|
20 | + private $_cachedir; |
|
21 | 21 | private $_cookiefile = NULL; |
22 | 22 | |
23 | 23 | function __construct($address, $locale = 'en', $cache_dir, $username, $password, $sharedSecret = null) |
@@ -29,32 +29,32 @@ discard block |
||
29 | 29 | $this->loginResult = $this->login($username, $password, $sharedSecret); |
30 | 30 | } |
31 | 31 | |
32 | - public function createRecord($name, $ip, $domain = 'somedomainnameyouwishtoupgrade.de', $type = 'A') |
|
33 | - { |
|
34 | - if (strpos($name, $domain) === false) { |
|
35 | - $name = $name.".".$domain; |
|
36 | - } |
|
37 | - try { |
|
38 | - $result = $this->call('nameserver', 'createRecord', array( |
|
39 | - 'domain' => $domain, |
|
40 | - 'type' => $type, |
|
41 | - 'name' => $name, |
|
42 | - 'content' => $ip |
|
43 | - )); |
|
44 | - return $result; |
|
45 | - } catch (Exception $e) { |
|
46 | - return $e->getMessage(); |
|
47 | - } |
|
48 | - } |
|
49 | - |
|
50 | - public function updateRecord($id, $ip) |
|
51 | - { |
|
32 | + public function createRecord($name, $ip, $domain = 'somedomainnameyouwishtoupgrade.de', $type = 'A') |
|
33 | + { |
|
34 | + if (strpos($name, $domain) === false) { |
|
35 | + $name = $name.".".$domain; |
|
36 | + } |
|
37 | + try { |
|
38 | + $result = $this->call('nameserver', 'createRecord', array( |
|
39 | + 'domain' => $domain, |
|
40 | + 'type' => $type, |
|
41 | + 'name' => $name, |
|
42 | + 'content' => $ip |
|
43 | + )); |
|
44 | + return $result; |
|
45 | + } catch (Exception $e) { |
|
46 | + return $e->getMessage(); |
|
47 | + } |
|
48 | + } |
|
49 | + |
|
50 | + public function updateRecord($id, $ip) |
|
51 | + { |
|
52 | 52 | $result = $this->call('nameserver','updateRecord', array( |
53 | 53 | 'id' => $id, |
54 | 54 | 'content' => $ip |
55 | 55 | )); |
56 | - return $result; |
|
57 | - } |
|
56 | + return $result; |
|
57 | + } |
|
58 | 58 | |
59 | 59 | public function login($username, $password, $sharedSecret = null) |
60 | 60 | { |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: joerg |
|
5 | - * Date: 14.02.16 |
|
6 | - * Time: 19:38 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: joerg |
|
5 | + * Date: 14.02.16 |
|
6 | + * Time: 19:38 |
|
7 | + */ |
|
8 | 8 | namespace Bingemer\InwxBundle\DependencyInjection; |
9 | 9 | |
10 | 10 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Created by PhpStorm. |
|
4 | - * User: joerg |
|
5 | - * Date: 14.02.16 |
|
6 | - * Time: 19:47 |
|
7 | - */ |
|
3 | + * Created by PhpStorm. |
|
4 | + * User: joerg |
|
5 | + * Date: 14.02.16 |
|
6 | + * Time: 19:47 |
|
7 | + */ |
|
8 | 8 | namespace Bingemer\InwxBundle\DependencyInjection; |
9 | 9 | |
10 | 10 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |