add getPhoneBookEntrys
authorStricted <info@stricted.de>
Sun, 26 Jul 2015 16:37:14 +0000 (18:37 +0200)
committerStricted <info@stricted.de>
Sun, 26 Jul 2015 16:37:14 +0000 (18:37 +0200)
SpeedportHybrid.class.php
tests/phonebookentrys.php [new file with mode: 0644]
tests/reconnect.php

index 758385ee53c5be8e757129b58891fc74153c2364..ad3c17168a930b279d3734e06c3774da5691f780 100644 (file)
@@ -241,6 +241,23 @@ class SpeedportHybrid {
                }
        }
        
+       /**
+        * get phone book entrys
+        *
+        * @return      array
+        */
+       public function getPhoneBookEntrys () {
+               $data = $this->getData('PhoneBook');
+               $data = $this->getValues($data);
+               
+               if (isset($data['addbookentry'])) {
+                       return $data['addbookentry'];
+               }
+               else {
+                       return array();
+               }
+       }
+       
        /**
         * get uptime based on online (connection) time
         *
diff --git a/tests/phonebookentrys.php b/tests/phonebookentrys.php
new file mode 100644 (file)
index 0000000..7d2dc9f
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+require_once('config.php');
+print_r($sp->getPhoneBookEntrys());
+$sp->logout();
index 3934d374d4e4a5b3b460c7fd7b252d31545405a2..9080228011c14337f0d0c642d9fd02a8e6962848 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 require_once('config.php');
-print_r($sp->changeConnectionStatus('offline'));
+print_r($sp->changeDSLStatus('offline'));
 print_r($sp->reconnectLte());
-print_r($sp->changeConnectionStatus('online'));
+print_r($sp->changeDSLStatus('online'));
 $sp->logout();