Just a thought, output->writeln() is coupling. What about using PSR-3? This doesn't need to be addressed right away