X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=ModCMD%2FBinding.class.php;h=7dc0d79567d82eb96b4b91f6b20bb7734c9ba248;hp=dfb247ffb7d4731626c9ce9b76cf5995b4967209;hb=0f30e96ae37491aee19e72b89cc54a6798d1f254;hpb=a53ed534c0e521ae169634f38f391b5bf7ca21b3 diff --git a/ModCMD/Binding.class.php b/ModCMD/Binding.class.php index dfb247f..7dc0d79 100644 --- a/ModCMD/Binding.class.php +++ b/ModCMD/Binding.class.php @@ -1,22 +1,19 @@ . * * * ************************************************************************ * @@ -24,15 +21,23 @@ * * a single Binding... * - ************************************************************************ - * - * */ class Binding { + private $bot; + private $method; + + public function __construct($bot, $method) { + $this->bot = $bot; + $this->method = $method; + } + + public function trigger($params) { + call_user_func_array(array($this->bot, $this->method), $params); + } - public function trigger() { - + public function match($bot, $method) { + return ($bot === $this->bot && strtolower($this->method) == strtolower($method)); } }