ds-codigos-postales-ine-es/scripts/ine/vendor/maximebf/consolekit/src/ConsoleKit/EchoTextWriter.php
2016-11-14 21:46:43 +01:00

30 lines
618 B
PHP

<?php
/*
* This file is part of the ConsoleKit package.
*
* (c) 2012 Maxime Bouroumeau-Fuseau
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ConsoleKit;
/**
* Simple writer that prints text using php's "echo()" function
*
* Note: Pipes are ignored
*/
class EchoTextWriter implements TextWriter
{
public function write($text, $pipe = TextWriter::STDOUT)
{
echo $text;
}
public function writeln($text = '', $pipe = TextWriter::STDOUT)
{
$this->write("$text\n", $pipe);
}
}