summaryrefslogtreecommitdiff
path: root/src/Command.php
diff options
context:
space:
mode:
authorFbenas <philbeansburton@gmail.com>2020-06-07 02:59:59 +0100
committerFbenas <philbeansburton@gmail.com>2020-06-07 02:59:59 +0100
commitb82f2c74d1fdb0e0aaaa4c93a2a904e376b310a2 (patch)
treebc1f3000424f9a837606bf610f80af0356ff7c5f /src/Command.php
parent1a9f3aa5596c2a9fa9096e56d29fea1e14bdaad7 (diff)
First pass at a php IRC helperfor I/O handling
Diffstat (limited to 'src/Command.php')
-rw-r--r--src/Command.php21
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;
+ }
+}