a kde tady budu definovat IP adresu routeru a jmeno a heslo ??? a to dam na to tlacitko jen tento odstavec ?? a knihovnu myslis prave to FirewallFilter.php to je ta knihovna, ktera musi byt primo u toho php souboru ???
public function disable($id) {
$sentence = new SentenceUtil();
$sentence->addCommand"("/ip/firewall/filter/disable);
$sentence->where(".id", "=", $id);
$this->talker->send($sentence);
return "Sucsess";
}
takze vse jsem nakopiroval na server.... celou slozku MikrotikAPI do adresare router. ve slozce Entity jsem upravil soubor Auth.php kde uvnitr jsem dopsal adresu routeru, login a heslo
*/
private $host = 172.16.43.251;
/**
*
* @var int
*/
private $port = 8728;
/**
*
* @var string
*/
private $username = admin;
/**
*
* @var string
*/
private $password = adminheslo;
potom jsem vytvoril soubor zapnuto.php
<?php
namespace MikrotikAPI\Commands\IP\Firewall;
use ..\router\Talker\Talker,
..\router\Util\SentenceUtil;
/**
* Description of Filter
* @author Lalu Erfandi Maula Yusnu nunenuh@gmail.com <http://vthink.web.i$
* @copyright Copyright (c) 2011, Virtual Think Team.
* @license http://opensource.org/licenses/gpl-license.php GNU Public Licen$
* @category Libraries
*/
class FirewallFilter {
/**
*
* @var Talker $talker
*/
private $talker;
function __construct(Talker $talker) {
$this->talker = $talker;
}
/**
*
* @param type $param array
* @return type array
* This method is used to add the firewall filter
*/
public function disable($id) {
$sentence = new SentenceUtil();
$sentence->addCommand("/ip/firewall/filter/disable");
$sentence->where(".id", "=", $id);
$this->talker->send($sentence);
return "Sucsess";
}
}
ale pri souboru pres prohlizec to nic neudela a je cista obrazovka