From: Stricted Date: Sun, 26 Jul 2015 16:37:14 +0000 (+0200) Subject: add getPhoneBookEntrys X-Git-Tag: 1.0.4~7 X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=commitdiff_plain;h=f94e171efe98f27679f36961f352cfe7359190ec add getPhoneBookEntrys --- diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index 758385e..ad3c171 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -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 index 0000000..7d2dc9f --- /dev/null +++ b/tests/phonebookentrys.php @@ -0,0 +1,4 @@ +getPhoneBookEntrys()); +$sp->logout(); diff --git a/tests/reconnect.php b/tests/reconnect.php index 3934d37..9080228 100644 --- a/tests/reconnect.php +++ b/tests/reconnect.php @@ -1,6 +1,6 @@ changeConnectionStatus('offline')); +print_r($sp->changeDSLStatus('offline')); print_r($sp->reconnectLte()); -print_r($sp->changeConnectionStatus('online')); +print_r($sp->changeDSLStatus('online')); $sp->logout();