N98\Util\Console\Helper\DatabaseHelper::fallbackOutput PHP Method

fallbackOutput() private method

small helper method to obtain an object of type OutputInterface
private fallbackOutput ( Symfony\Component\Console\Output\OutputInterface $output = null ) : Symfony\Component\Console\Output\OutputInterface
$output Symfony\Component\Console\Output\OutputInterface
return Symfony\Component\Console\Output\OutputInterface
    private function fallbackOutput(OutputInterface $output = null)
    {
        if (null !== $output) {
            return $output;
        }
        if ($this->getHelperSet()->has('io')) {
            /** @var $helper IoHelper */
            $helper = $this->getHelperSet()->get('io');
            $output = $helper->getOutput();
        }
        if (null === $output) {
            $output = new NullOutput();
        }
        return $output;
    }