1
0
Fork 0
occweb/lib/Controller/OCCOutput.php

44 lines
1013 B
PHP
Raw Normal View History

<?php
2019-01-19 14:54:24 +00:00
namespace OCA\OCCWeb\Controller;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
2020-01-26 14:37:16 +00:00
use Symfony\Component\Console\Output\ConsoleSectionOutput;
use Symfony\Component\Console\Output\OutputInterface;
2020-01-30 21:04:23 +00:00
2019-01-19 16:20:07 +00:00
class OccOutput extends BufferedOutput implements ConsoleOutputInterface
{
2020-01-30 21:04:23 +00:00
private $consoleSectionOutputs = [];
2020-01-30 21:04:23 +00:00
private $stream;
/**
* Gets the OutputInterface for errors.
*
* @return OutputInterface
*/
public function getErrorOutput()
{
// TODO: Implement getErrorOutput() method.
return $this;
}
public function setErrorOutput(OutputInterface $error)
{
}
2020-01-26 14:37:16 +00:00
2020-01-30 21:04:23 +00:00
/**
* Creates a new output section.
*/
public function section(): ConsoleSectionOutput {
if ($this->stream === null) {
$this->stream = fopen('php://temp','w');
}
return new ConsoleSectionOutput($this->stream, $this->consoleSectionOutputs, $this->getVerbosity(), $this->isDecorated(), $this->getFormatter());
}
}