3 * @author Jan Altensen (Stricted)
4 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
5 * @copyright 2015 Jan Altensen (Stricted)
9 * get all Portforwarding Entrys
13 public function getPortforwardingEntrys () {
14 $data = $this->getData('Portforwarding');
15 $data = $this->getValues($data);
19 if (isset($data['addportuw'])) {
20 return $data['addportuw'];
28 * delete Portforwarding Entry
34 public function deletePortforwardingEntry ($id) {
37 $path = 'data/Portforwarding.json';
38 $fields = array('csrf_token' => $this->token
,
39 'id_portforward' => $id,
40 'deleteEntry' => 'delete'
43 $data = $this->sentRequest($path, $fields, true);
44 $data = $this->getValues($data['body']);
46 if ($data['status'] == 'ok') {
50 throw new RouterException('can not delete Phone Book Entry');
55 * add Portforwarding Entry
58 * @param integer $device
60 public function addPortforwardingEntry ($name, $device) {
61 // TODO: find a way to make this possible
66 * optvar_portuw_template = -1
82 * edit Portforwarding Entry
86 * @param integer $device
88 public function editPortforwardingEntry ($id, $name, $device) {
89 // TODO: find a way to make this possible