diff options
Diffstat (limited to 'src/Command.php')
-rw-r--r-- | src/Command.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Command.php b/src/Command.php new file mode 100644 index 0000000..6fb3770 --- /dev/null +++ b/src/Command.php @@ -0,0 +1,21 @@ +<?php + +namespace FBeans\BlaIRC; + +use Closure; +use Symfony\Component\Console\Command\Command as SymfonyCommand; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +class Command extends SymfonyCommand +{ + protected function execute(InputInterface $input, OutputInterface $output) + { + return call_user_func($this->execute_callback, $input, $output); + } + + public function setExecuteCallback(Closure $callable) + { + $this->execute_callback = $callable; + } +} |