Error.php
TLDR
This file contains the Error
class, which is a component used for rendering an error message.
Classes
Error
The Error
class is a component that renders an error message. It extends the Component
class. It contains one method:
render($string, $verbosity = OutputInterface::VERBOSITY_NORMAL)
This method renders the error message using the given string
argument and verbosity
level. It uses the Line
class to render the error message.
<?php
namespace Illuminate\Console\View\Components;
use Symfony\Component\Console\Output\OutputInterface;
class Error extends Component
{
/**
* Renders the component using the given arguments.
*
* @param string $string
* @param int $verbosity
* @return void
*/
public function render($string, $verbosity = OutputInterface::VERBOSITY_NORMAL)
{
with(new Line($this->output))->render('error', $string, $verbosity);
}
}