* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/indexing:oai-pmh Wiki */ namespace VuFindHarvest\ConsoleOutput; use Symfony\Component\Console\Output\OutputInterface; /** * Thin wrapper around console output * * @category VuFind * @package Harvest_Tools * @author Demian Katz * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/indexing:oai-pmh Wiki */ class ConsoleWriter implements WriterInterface { /** * Output interface * * @var OutputInterface */ protected $output; /** * Constructor * * @param OutputInterface $output Output interface */ public function __construct(OutputInterface $output) { $this->output = $output; } /** * Output a string to the Console. * * @param string $str String to write. * * @return void */ public function write($str) { $this->output->write($str); } /** * Output a string w/newline to the Console. * * @param string $str String to write. * * @return void */ public function writeLine($str) { $this->output->writeln($str); } }