summaryrefslogtreecommitdiff
path: root/src/Command.php
blob: 6fb3770759d802fcda3bc77c70dc746457c5b691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
    }
}